Process expireTimer and block status along with contact/group sync (#1980)
* Mark group as left = false if it is active in contact sync * Handle expireTimer + blocked state along with contact/group sync
This commit is contained in:
parent
3f0354f09e
commit
72b7e4ec34
6 changed files with 162 additions and 54 deletions
|
@ -82,13 +82,19 @@
|
|||
render_attributes: function() {
|
||||
var seconds = this.model.get('expirationTimerUpdate').expireTimer;
|
||||
var timerMessage;
|
||||
if (this.conversation.id === textsecure.storage.user.getNumber()) {
|
||||
timerMessage = i18n('youChangedTheTimer',
|
||||
Whisper.ExpirationTimerOptions.getName(seconds));
|
||||
|
||||
var timerUpdate = this.model.get('expirationTimerUpdate');
|
||||
var prettySeconds = Whisper.ExpirationTimerOptions.getName(seconds);
|
||||
|
||||
if (timerUpdate && timerUpdate.fromSync) {
|
||||
timerMessage = i18n('timerSetOnSync', prettySeconds);
|
||||
} else if (this.conversation.id === textsecure.storage.user.getNumber()) {
|
||||
timerMessage = i18n('youChangedTheTimer', prettySeconds);
|
||||
} else {
|
||||
timerMessage = i18n('theyChangedTheTimer', [
|
||||
this.conversation.getTitle(),
|
||||
Whisper.ExpirationTimerOptions.getName(seconds)]);
|
||||
prettySeconds,
|
||||
]);
|
||||
}
|
||||
return { content: timerMessage };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue