Adds sentAt to notification logging
This commit is contained in:
parent
95bdfcf8f3
commit
b1ee0a1d68
5 changed files with 11 additions and 1 deletions
|
@ -5114,6 +5114,7 @@ export class ConversationModel extends window.Backbone
|
|||
message: message.getNotificationText(),
|
||||
messageId,
|
||||
reaction: reaction ? reaction.toJSON() : null,
|
||||
sentAt: message.get('timestamp'),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1453,6 +1453,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
? window.i18n('icu:Stories__failed-send--partial')
|
||||
: window.i18n('icu:Stories__failed-send--full'),
|
||||
isExpiringMessage: false,
|
||||
sentAt: this.get('timestamp'),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1283,6 +1283,7 @@ export class CallingClass {
|
|||
this.reduxInterface.setPresenting();
|
||||
}
|
||||
},
|
||||
sentAt: 0,
|
||||
silent: true,
|
||||
title: window.i18n('icu:calling__presenting--notification-title'),
|
||||
});
|
||||
|
@ -2295,6 +2296,7 @@ export class CallingClass {
|
|||
isVideoCall: true,
|
||||
});
|
||||
},
|
||||
sentAt: 0,
|
||||
silent: false,
|
||||
title: notificationTitle,
|
||||
});
|
||||
|
|
|
@ -26,6 +26,7 @@ type NotificationDataType = Readonly<{
|
|||
targetTimestamp: number;
|
||||
};
|
||||
senderTitle: string;
|
||||
sentAt: number;
|
||||
storyId?: string;
|
||||
useTriToneSound?: boolean;
|
||||
wasShown?: boolean;
|
||||
|
@ -129,6 +130,7 @@ class NotificationService extends EventEmitter {
|
|||
message,
|
||||
messageId,
|
||||
onNotificationClick,
|
||||
sentAt,
|
||||
silent,
|
||||
title,
|
||||
useTriToneSound,
|
||||
|
@ -137,11 +139,12 @@ class NotificationService extends EventEmitter {
|
|||
message: string;
|
||||
messageId?: string;
|
||||
onNotificationClick: () => void;
|
||||
sentAt: number;
|
||||
silent: boolean;
|
||||
title: string;
|
||||
useTriToneSound?: boolean;
|
||||
}>): void {
|
||||
log.info('NotificationService: showing a notification');
|
||||
log.info('NotificationService: showing a notification', sentAt);
|
||||
|
||||
this.lastNotification?.close();
|
||||
|
||||
|
@ -275,6 +278,7 @@ class NotificationService extends EventEmitter {
|
|||
reaction,
|
||||
senderTitle,
|
||||
storyId,
|
||||
sentAt,
|
||||
useTriToneSound,
|
||||
wasShown,
|
||||
} = notificationData;
|
||||
|
@ -349,6 +353,7 @@ class NotificationService extends EventEmitter {
|
|||
onNotificationClick: () => {
|
||||
this.emit('click', conversationId, messageId, storyId);
|
||||
},
|
||||
sentAt,
|
||||
silent: !shouldPlayNotificationSound,
|
||||
title: notificationTitle,
|
||||
useTriToneSound,
|
||||
|
|
|
@ -89,6 +89,7 @@ async function notifyForCall(
|
|||
onNotificationClick: () => {
|
||||
window.IPC.showWindow();
|
||||
},
|
||||
sentAt: 0,
|
||||
// The ringtone plays so we don't need sound for the notification
|
||||
silent: true,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue