Hydrate body ranges for story replies
This commit is contained in:
parent
9f85db3fd8
commit
be6e988a95
39 changed files with 221 additions and 172 deletions
|
@ -296,15 +296,20 @@ export const getStoryReplies = createSelector(
|
|||
? me
|
||||
: conversationSelector(reply.sourceUuid || reply.source);
|
||||
|
||||
const { bodyRanges } = reply;
|
||||
|
||||
return {
|
||||
author: getAvatarData(conversation),
|
||||
...pick(reply, [
|
||||
'body',
|
||||
'bodyRanges',
|
||||
'deletedForEveryone',
|
||||
'id',
|
||||
'timestamp',
|
||||
]),
|
||||
...pick(reply, ['body', 'deletedForEveryone', 'id', 'timestamp']),
|
||||
bodyRanges: bodyRanges?.map(bodyRange => {
|
||||
const mentionConvo = conversationSelector(bodyRange.mentionUuid);
|
||||
|
||||
return {
|
||||
...bodyRange,
|
||||
conversationID: mentionConvo.id,
|
||||
replacementText: mentionConvo.title,
|
||||
};
|
||||
}),
|
||||
reactionEmoji: reply.storyReaction?.emoji,
|
||||
contactNameColor: contactNameColorSelector(
|
||||
reply.conversationId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue