message.setToExpire: Log start timestamp, log before save
This commit is contained in:
parent
89d5972522
commit
1d1fccd96f
1 changed files with 7 additions and 5 deletions
|
@ -1814,17 +1814,19 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
const expiresAt = start + delta;
|
const expiresAt = start + delta;
|
||||||
|
|
||||||
this.set({ expires_at: expiresAt });
|
this.set({ expires_at: expiresAt });
|
||||||
|
|
||||||
|
window.log.info('Set message expiration', {
|
||||||
|
start,
|
||||||
|
expiresAt,
|
||||||
|
sentAt: this.get('sent_at'),
|
||||||
|
});
|
||||||
|
|
||||||
const id = this.get('id');
|
const id = this.get('id');
|
||||||
if (id && !skipSave) {
|
if (id && !skipSave) {
|
||||||
await window.Signal.Data.saveMessage(this.attributes, {
|
await window.Signal.Data.saveMessage(this.attributes, {
|
||||||
Message: window.Whisper.Message,
|
Message: window.Whisper.Message,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.log.info('Set message expiration', {
|
|
||||||
expiresAt,
|
|
||||||
sentAt: this.get('sent_at'),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue