fix expiretimer on closed groups message showing on session conversation

pull/1223/head
Audric Ackermann 5 years ago
parent a02aa75f1f
commit 0366f29473
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -413,6 +413,7 @@ interface MessageCreationData {
isRss: boolean;
source: boolean;
serverId: string;
message: any;
// Needed for synced outgoing messages
unidentifiedStatus: any; // ???
@ -430,9 +431,11 @@ export function initIncomingMessage(data: MessageCreationData): MessageModel {
isRss,
source,
serverId,
message,
} = data;
const type = 'incoming';
const groupId = message?.group?.id;
const messageData: any = {
source,
@ -440,7 +443,7 @@ export function initIncomingMessage(data: MessageCreationData): MessageModel {
serverId, // + (not present below in `createSentMessage`)
sent_at: timestamp,
received_at: receivedAt || Date.now(),
conversationId: source,
conversationId: groupId ?? source,
unidentifiedDeliveryReceived, // +
type,
direction: 'incoming', // +

Loading…
Cancel
Save