Use <Message /> for group story replies

This commit is contained in:
Josh Perez 2022-08-04 21:29:44 -04:00 committed by GitHub
parent dca848389c
commit 5dc42122a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 169 additions and 78 deletions

View file

@ -80,8 +80,10 @@ function getAvatarData(
ConversationType,
| 'acceptedMessageRequest'
| 'avatarPath'
| 'badges'
| 'color'
| 'isMe'
| 'id'
| 'name'
| 'profileName'
| 'sharedGroupNames'
@ -90,8 +92,10 @@ function getAvatarData(
return pick(conversation, [
'acceptedMessageRequest',
'avatarPath',
'badges',
'color',
'isMe',
'id',
'name',
'profileName',
'sharedGroupNames',
@ -212,11 +216,12 @@ export const getStoryReplies = createSelector(
const conversation = conversationSelector(reaction.fromId);
return {
...getAvatarData(conversation),
author: getAvatarData(conversation),
contactNameColor: contactNameColorSelector(
foundStory.conversationId,
conversation.id
),
conversationId: reaction.fromId,
id: getReactionUniqueId(reaction),
reactionEmoji: reaction.emoji,
timestamp: reaction.timestamp,
@ -231,12 +236,14 @@ export const getStoryReplies = createSelector(
: conversationSelector(reply.sourceUuid || reply.source);
return {
...getAvatarData(conversation),
author: getAvatarData(conversation),
...pick(reply, ['body', 'deletedForEveryone', 'id', 'timestamp']),
contactNameColor: contactNameColorSelector(
reply.conversationId,
conversation.id
),
conversationId: conversation.id,
readStatus: reply.readStatus,
};
});