Show original sent timestamp for edited messages
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
bc594b5ae7
commit
2179577636
3 changed files with 6 additions and 9 deletions
|
@ -4205,10 +4205,7 @@ export class ConversationModel extends window.Backbone
|
|||
: undefined;
|
||||
|
||||
timestamp =
|
||||
callHistory?.timestamp ||
|
||||
activityMessage.get('editMessageTimestamp') ||
|
||||
activityMessage.get('sent_at') ||
|
||||
timestamp;
|
||||
callHistory?.timestamp || activityMessage.get('sent_at') || timestamp;
|
||||
lastMessageReceivedAt =
|
||||
activityMessage.get('received_at') || lastMessageReceivedAt;
|
||||
lastMessageReceivedAtMs =
|
||||
|
|
|
@ -775,7 +775,7 @@ export const getPropsForMessage = (
|
|||
status: getMessagePropStatus(message, ourConversationId),
|
||||
text: message.body,
|
||||
textDirection: getTextDirection(message.body),
|
||||
timestamp: getMessageSentTimestamp(message, { includeEdits: true, log }),
|
||||
timestamp: getMessageSentTimestamp(message, { includeEdits: false, log }),
|
||||
receivedAtMS: message.received_at_ms,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -348,7 +348,7 @@ describe('editing', function (this: Mocha.Suite) {
|
|||
|
||||
await sendEditedMessage(
|
||||
window,
|
||||
firstEdit.dataMessage?.timestamp?.toNumber() ?? 0,
|
||||
originalMessage.timestamp?.toNumber() ?? 0,
|
||||
'.3'
|
||||
);
|
||||
|
||||
|
@ -361,7 +361,7 @@ describe('editing', function (this: Mocha.Suite) {
|
|||
|
||||
debug('opening edit history');
|
||||
const secondEditMessage = window.locator(
|
||||
`.module-message[data-testid="${secondEdit.dataMessage?.timestamp?.toNumber()}"]`
|
||||
`.module-message[data-testid="${originalMessage?.timestamp?.toNumber()}"]`
|
||||
);
|
||||
await secondEditMessage
|
||||
.locator('.module-message__metadata__edited')
|
||||
|
@ -669,7 +669,7 @@ describe('editing', function (this: Mocha.Suite) {
|
|||
debug('sending edit message v3 desktop -> friend');
|
||||
await sendEditedMessage(
|
||||
page,
|
||||
editMessageV2.dataMessage?.timestamp?.toNumber() ?? 0,
|
||||
originalMessage?.timestamp?.toNumber() ?? 0,
|
||||
'3'
|
||||
);
|
||||
|
||||
|
@ -690,7 +690,7 @@ describe('editing', function (this: Mocha.Suite) {
|
|||
debug('sending edit message v4 desktop -> friend');
|
||||
await sendEditedMessage(
|
||||
page,
|
||||
editMessageV3.dataMessage?.timestamp?.toNumber() ?? 0,
|
||||
originalMessage?.timestamp?.toNumber() ?? 0,
|
||||
'4'
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue