Render end session messages correctly

This commit is contained in:
lilia 2015-02-13 13:12:54 -08:00
parent 488f25635d
commit f00a8f1e81
4 changed files with 36 additions and 0 deletions

View file

@ -44,6 +44,8 @@
this.group_update_view = new Whisper.GroupUpdateView({
model: groupUpdate
}).render();
} else if (this.model.get('flags') === textsecure.protobuf.PushMessageContent.Flags.END_SESSION) {
this.end_session_view = new Whisper.EndSessionView();
} else {
this.template = $('#message').html();
}
@ -57,6 +59,8 @@
render: function() {
if (this.group_update_view) {
this.$el.append(this.group_update_view.$el);
} else if (this.end_session_view) {
this.$el.append(this.end_session_view.$el);
} else {
this.$el.html(
Mustache.render(this.template, {