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(),
|
message: message.getNotificationText(),
|
||||||
messageId,
|
messageId,
|
||||||
reaction: reaction ? reaction.toJSON() : null,
|
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--partial')
|
||||||
: window.i18n('icu:Stories__failed-send--full'),
|
: window.i18n('icu:Stories__failed-send--full'),
|
||||||
isExpiringMessage: false,
|
isExpiringMessage: false,
|
||||||
|
sentAt: this.get('timestamp'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1283,6 +1283,7 @@ export class CallingClass {
|
||||||
this.reduxInterface.setPresenting();
|
this.reduxInterface.setPresenting();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sentAt: 0,
|
||||||
silent: true,
|
silent: true,
|
||||||
title: window.i18n('icu:calling__presenting--notification-title'),
|
title: window.i18n('icu:calling__presenting--notification-title'),
|
||||||
});
|
});
|
||||||
|
@ -2295,6 +2296,7 @@ export class CallingClass {
|
||||||
isVideoCall: true,
|
isVideoCall: true,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
sentAt: 0,
|
||||||
silent: false,
|
silent: false,
|
||||||
title: notificationTitle,
|
title: notificationTitle,
|
||||||
});
|
});
|
||||||
|
|
|
@ -26,6 +26,7 @@ type NotificationDataType = Readonly<{
|
||||||
targetTimestamp: number;
|
targetTimestamp: number;
|
||||||
};
|
};
|
||||||
senderTitle: string;
|
senderTitle: string;
|
||||||
|
sentAt: number;
|
||||||
storyId?: string;
|
storyId?: string;
|
||||||
useTriToneSound?: boolean;
|
useTriToneSound?: boolean;
|
||||||
wasShown?: boolean;
|
wasShown?: boolean;
|
||||||
|
@ -129,6 +130,7 @@ class NotificationService extends EventEmitter {
|
||||||
message,
|
message,
|
||||||
messageId,
|
messageId,
|
||||||
onNotificationClick,
|
onNotificationClick,
|
||||||
|
sentAt,
|
||||||
silent,
|
silent,
|
||||||
title,
|
title,
|
||||||
useTriToneSound,
|
useTriToneSound,
|
||||||
|
@ -137,11 +139,12 @@ class NotificationService extends EventEmitter {
|
||||||
message: string;
|
message: string;
|
||||||
messageId?: string;
|
messageId?: string;
|
||||||
onNotificationClick: () => void;
|
onNotificationClick: () => void;
|
||||||
|
sentAt: number;
|
||||||
silent: boolean;
|
silent: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
useTriToneSound?: boolean;
|
useTriToneSound?: boolean;
|
||||||
}>): void {
|
}>): void {
|
||||||
log.info('NotificationService: showing a notification');
|
log.info('NotificationService: showing a notification', sentAt);
|
||||||
|
|
||||||
this.lastNotification?.close();
|
this.lastNotification?.close();
|
||||||
|
|
||||||
|
@ -275,6 +278,7 @@ class NotificationService extends EventEmitter {
|
||||||
reaction,
|
reaction,
|
||||||
senderTitle,
|
senderTitle,
|
||||||
storyId,
|
storyId,
|
||||||
|
sentAt,
|
||||||
useTriToneSound,
|
useTriToneSound,
|
||||||
wasShown,
|
wasShown,
|
||||||
} = notificationData;
|
} = notificationData;
|
||||||
|
@ -349,6 +353,7 @@ class NotificationService extends EventEmitter {
|
||||||
onNotificationClick: () => {
|
onNotificationClick: () => {
|
||||||
this.emit('click', conversationId, messageId, storyId);
|
this.emit('click', conversationId, messageId, storyId);
|
||||||
},
|
},
|
||||||
|
sentAt,
|
||||||
silent: !shouldPlayNotificationSound,
|
silent: !shouldPlayNotificationSound,
|
||||||
title: notificationTitle,
|
title: notificationTitle,
|
||||||
useTriToneSound,
|
useTriToneSound,
|
||||||
|
|
|
@ -89,6 +89,7 @@ async function notifyForCall(
|
||||||
onNotificationClick: () => {
|
onNotificationClick: () => {
|
||||||
window.IPC.showWindow();
|
window.IPC.showWindow();
|
||||||
},
|
},
|
||||||
|
sentAt: 0,
|
||||||
// The ringtone plays so we don't need sound for the notification
|
// The ringtone plays so we don't need sound for the notification
|
||||||
silent: true,
|
silent: true,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue