mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Frontend for timer updates and timer indicator
This commit is contained in:
@@ -71,7 +71,6 @@
|
||||
if (this.isIncoming() && this.hasErrors()) {
|
||||
return i18n('incomingError');
|
||||
}
|
||||
|
||||
return this.get('body');
|
||||
},
|
||||
getNotificationText: function() {
|
||||
@@ -126,15 +125,6 @@
|
||||
}
|
||||
return c;
|
||||
},
|
||||
getModelForExpirationTimerUpdate: function() {
|
||||
var id = this.get('timerUpdate').source;
|
||||
var c = ConversationController.get(id);
|
||||
if (!c) {
|
||||
c = ConversationController.create({ id: id, type: 'private' });
|
||||
c.fetch();
|
||||
}
|
||||
return c;
|
||||
},
|
||||
isOutgoing: function() {
|
||||
return this.get('type') === 'outgoing';
|
||||
},
|
||||
@@ -364,9 +354,18 @@
|
||||
flags : dataMessage.flags,
|
||||
errors : []
|
||||
});
|
||||
|
||||
if (dataMessage.expireTimer) {
|
||||
if (message.isExpirationTimerUpdate()) {
|
||||
message.set({
|
||||
expirationTimerUpdate: {
|
||||
source : source,
|
||||
expireTimer : dataMessage.expireTimer
|
||||
}
|
||||
});
|
||||
conversation.set({expireTimer: dataMessage.expireTimer});
|
||||
} else if (dataMessage.expireTimer) {
|
||||
message.set({expireTimer: dataMessage.expireTimer});
|
||||
// todo: insert an update if needed
|
||||
conversation.set({expireTimer: dataMessage.expireTimer});
|
||||
}
|
||||
|
||||
var conversation_timestamp = conversation.get('timestamp');
|
||||
|
||||
Reference in New Issue
Block a user