|
|
|
@ -1093,7 +1093,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async markMessageAsRead(readAt: number) {
|
|
|
|
|
await this.markMessageReadNoCommit(readAt);
|
|
|
|
|
this.markMessageReadNoCommit(readAt);
|
|
|
|
|
await this.commit();
|
|
|
|
|
// the line below makes sure that getNextExpiringMessage will find this message as expiring.
|
|
|
|
|
// getNextExpiringMessage is used on app start to clean already expired messages which should have been removed already, but are not
|
|
|
|
@ -1102,7 +1102,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
|
|
|
|
|
await this.getConversation()?.refreshInMemoryDetails();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async markMessageReadNoCommit(readAt: number) {
|
|
|
|
|
public markMessageReadNoCommit(readAt: number) {
|
|
|
|
|
this.set({ unread: READ_MESSAGE_STATE.read });
|
|
|
|
|
|
|
|
|
|
const convo = this.getConversation();
|
|
|
|
|