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,
|
storyReactionMessage: message,
|
||||||
targetAuthorAci,
|
targetAuthorAci,
|
||||||
targetTimestamp: reaction.targetTimestamp,
|
targetTimestamp: reaction.targetTimestamp,
|
||||||
|
receivedAtDate: data.receivedAtDate,
|
||||||
timestamp,
|
timestamp,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2731,6 +2732,7 @@ export async function startApp(): Promise<void> {
|
||||||
storyReactionMessage: message,
|
storyReactionMessage: message,
|
||||||
targetAuthorAci,
|
targetAuthorAci,
|
||||||
targetTimestamp: reaction.targetTimestamp,
|
targetTimestamp: reaction.targetTimestamp,
|
||||||
|
receivedAtDate: data.receivedAtDate,
|
||||||
timestamp,
|
timestamp,
|
||||||
};
|
};
|
||||||
drop(Reactions.onReaction(attributes));
|
drop(Reactions.onReaction(attributes));
|
||||||
|
|
|
@ -28,6 +28,7 @@ export type ReactionAttributesType = {
|
||||||
targetAuthorAci: AciString;
|
targetAuthorAci: AciString;
|
||||||
targetTimestamp: number;
|
targetTimestamp: number;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
receivedAtDate: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const reactions = new Map<string, ReactionAttributesType>();
|
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;
|
fromId: string;
|
||||||
targetTimestamp: number;
|
targetTimestamp: number;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
receivedAtDate: undefined | number;
|
||||||
isSentByConversationId?: Record<string, boolean>;
|
isSentByConversationId?: Record<string, boolean>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2446,6 +2446,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
fromId: reaction.fromId,
|
fromId: reaction.fromId,
|
||||||
targetTimestamp: reaction.targetTimestamp,
|
targetTimestamp: reaction.targetTimestamp,
|
||||||
timestamp: reaction.timestamp,
|
timestamp: reaction.timestamp,
|
||||||
|
receivedAtDate: reaction.receivedAtDate,
|
||||||
isSentByConversationId: isFromThisDevice
|
isSentByConversationId: isFromThisDevice
|
||||||
? zipObject(conversation.getMemberConversationIds(), repeat(false))
|
? zipObject(conversation.getMemberConversationIds(), repeat(false))
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|
|
@ -109,6 +109,7 @@ export async function enqueueReactionForSend({
|
||||||
storyReactionMessage,
|
storyReactionMessage,
|
||||||
targetAuthorAci,
|
targetAuthorAci,
|
||||||
targetTimestamp,
|
targetTimestamp,
|
||||||
|
receivedAtDate: timestamp,
|
||||||
timestamp,
|
timestamp,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ describe('reaction utilities', () => {
|
||||||
fromId: OUR_CONVO_ID,
|
fromId: OUR_CONVO_ID,
|
||||||
targetTimestamp: Date.now(),
|
targetTimestamp: Date.now(),
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
receivedAtDate: Date.now(),
|
||||||
...(isPending ? { isSentByConversationId: { [uuid()]: false } } : {}),
|
...(isPending ? { isSentByConversationId: { [uuid()]: false } } : {}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1606,6 +1606,7 @@ describe('both/state/ducks/conversations', () => {
|
||||||
emoji: '✨',
|
emoji: '✨',
|
||||||
fromId: 'some-other-id',
|
fromId: 'some-other-id',
|
||||||
timestamp: 2222,
|
timestamp: 2222,
|
||||||
|
receivedAtDate: 3333,
|
||||||
targetTimestamp: 1111,
|
targetTimestamp: 1111,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1636,6 +1637,7 @@ describe('both/state/ducks/conversations', () => {
|
||||||
emoji: '✨',
|
emoji: '✨',
|
||||||
fromId: 'some-other-id',
|
fromId: 'some-other-id',
|
||||||
timestamp: 2222,
|
timestamp: 2222,
|
||||||
|
receivedAtDate: 3333,
|
||||||
targetTimestamp: 1111,
|
targetTimestamp: 1111,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue