diff --git a/conversation.html b/conversation.html
index c1616302b..d0b9adfeb 100644
--- a/conversation.html
+++ b/conversation.html
@@ -105,6 +105,7 @@
+
diff --git a/js/background.js b/js/background.js
index 375ec35ff..0619b8783 100644
--- a/js/background.js
+++ b/js/background.js
@@ -176,6 +176,7 @@
decrypted_at : now,
type : type,
sent_at : timestamp,
+ flags : pushMessageContent.flags,
errors : []
});
diff --git a/js/views/end_session_view.js b/js/views/end_session_view.js
new file mode 100644
index 000000000..a1b1e2035
--- /dev/null
+++ b/js/views/end_session_view.js
@@ -0,0 +1,30 @@
+/* vim: ts=4:sw=4:expandtab
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+(function () {
+ 'use strict';
+
+ window.Whisper = window.Whisper || {};
+
+ Whisper.EndSessionView = Backbone.View.extend({
+ tagName: "div",
+ className: "end-session",
+ render: function() {
+ this.$el.text("Secure session ended");
+ return this;
+ }
+ });
+
+})();
diff --git a/js/views/message_view.js b/js/views/message_view.js
index 0ce531cae..afa674163 100644
--- a/js/views/message_view.js
+++ b/js/views/message_view.js
@@ -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, {