Persist reaction.receivedAtDate
This commit is contained in:
parent
b2a3605d77
commit
47c49d0a20
7 changed files with 9 additions and 0 deletions
|
@ -2397,6 +2397,7 @@ export async function startApp(): Promise<void> {
|
|||
storyReactionMessage: message,
|
||||
targetAuthorAci,
|
||||
targetTimestamp: reaction.targetTimestamp,
|
||||
receivedAtDate: data.receivedAtDate,
|
||||
timestamp,
|
||||
};
|
||||
|
||||
|
@ -2731,6 +2732,7 @@ export async function startApp(): Promise<void> {
|
|||
storyReactionMessage: message,
|
||||
targetAuthorAci,
|
||||
targetTimestamp: reaction.targetTimestamp,
|
||||
receivedAtDate: data.receivedAtDate,
|
||||
timestamp,
|
||||
};
|
||||
drop(Reactions.onReaction(attributes));
|
||||
|
|
|
@ -28,6 +28,7 @@ export type ReactionAttributesType = {
|
|||
targetAuthorAci: AciString;
|
||||
targetTimestamp: number;
|
||||
timestamp: number;
|
||||
receivedAtDate: number;
|
||||
};
|
||||
|
||||
const reactions = new Map<string, ReactionAttributesType>();
|
||||
|
|
1
ts/model-types.d.ts
vendored
1
ts/model-types.d.ts
vendored
|
@ -110,6 +110,7 @@ export type MessageReactionType = {
|
|||
fromId: string;
|
||||
targetTimestamp: number;
|
||||
timestamp: number;
|
||||
receivedAtDate: undefined | number;
|
||||
isSentByConversationId?: Record<string, boolean>;
|
||||
};
|
||||
|
||||
|
|
|
@ -2446,6 +2446,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
fromId: reaction.fromId,
|
||||
targetTimestamp: reaction.targetTimestamp,
|
||||
timestamp: reaction.timestamp,
|
||||
receivedAtDate: reaction.receivedAtDate,
|
||||
isSentByConversationId: isFromThisDevice
|
||||
? zipObject(conversation.getMemberConversationIds(), repeat(false))
|
||||
: undefined,
|
||||
|
|
|
@ -109,6 +109,7 @@ export async function enqueueReactionForSend({
|
|||
storyReactionMessage,
|
||||
targetAuthorAci,
|
||||
targetTimestamp,
|
||||
receivedAtDate: timestamp,
|
||||
timestamp,
|
||||
};
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ describe('reaction utilities', () => {
|
|||
fromId: OUR_CONVO_ID,
|
||||
targetTimestamp: Date.now(),
|
||||
timestamp: Date.now(),
|
||||
receivedAtDate: Date.now(),
|
||||
...(isPending ? { isSentByConversationId: { [uuid()]: false } } : {}),
|
||||
});
|
||||
|
||||
|
|
|
@ -1606,6 +1606,7 @@ describe('both/state/ducks/conversations', () => {
|
|||
emoji: '✨',
|
||||
fromId: 'some-other-id',
|
||||
timestamp: 2222,
|
||||
receivedAtDate: 3333,
|
||||
targetTimestamp: 1111,
|
||||
},
|
||||
],
|
||||
|
@ -1636,6 +1637,7 @@ describe('both/state/ducks/conversations', () => {
|
|||
emoji: '✨',
|
||||
fromId: 'some-other-id',
|
||||
timestamp: 2222,
|
||||
receivedAtDate: 3333,
|
||||
targetTimestamp: 1111,
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue