mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Ensure timer updates show in convo before initiating message
This commit is contained in:
@@ -878,11 +878,17 @@
|
||||
});
|
||||
|
||||
source = source || textsecure.storage.user.getNumber();
|
||||
const timestamp = receivedAt || Date.now();
|
||||
|
||||
// When we add a disappearing messages notification to the conversation, we want it
|
||||
// to be above the message that initiated that change, hence the subtraction.
|
||||
const timestamp = (receivedAt || Date.now()) - 1;
|
||||
|
||||
const message = this.messageCollection.add({
|
||||
// Even though this isn't reflected to the user, we want to place the last seen
|
||||
// indicator above it. We set it to 'unread' to trigger that placement.
|
||||
unread: 1,
|
||||
conversationId: this.id,
|
||||
type: receivedAt ? 'incoming' : 'outgoing',
|
||||
// No type; 'incoming' messages are specially treated by conversation.markRead()
|
||||
sent_at: timestamp,
|
||||
received_at: timestamp,
|
||||
flags: textsecure.protobuf.DataMessage.Flags.EXPIRATION_TIMER_UPDATE,
|
||||
|
||||
Reference in New Issue
Block a user