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:
Scott Nonnenberg 2018-01-29 18:14:39 -08:00 committed by GitHub
parent 3f0354f09e
commit 72b7e4ec34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 162 additions and 54 deletions

View file

@ -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 };
}