' +
'
' +
@@ -620,16 +641,16 @@ xmppchat.ChatRoomView = xmppchat.ChatBoxView.extend({
},
onMessage: function (message) {
- if ($(message).attr('id') === this.last_msgid) {
- // Return if own message sent just now...
- return true;
- }
var body = $(message).children('body').text(),
jid = $(message).attr('from'),
composing = $(message).find('composing'),
$chat_content = $(this.el).find('.chat-content'),
- sender = Strophe.getResourceFromJid(jid);
+ sender = Strophe.getResourceFromJid(jid),
+ subject = $(message).children('subject').text();
+ if (subject) {
+ this.$el.find('.chatroom-topic').text(subject);
+ }
if (!body) {
if (composing.length > 0) {
this.insertStatusNotification('is typing');
@@ -1291,13 +1312,13 @@ $(document).ready($.proxy(function () {
this.xmppstatus.sendPresence();
// Controlbox toggler
- $toggle.bind('click', function (e) {
+ $toggle.bind('click', $.proxy(function (e) {
e.preventDefault();
if ($("div#online-users-container").is(':visible')) {
this.chatboxesview.closeChat('online-users-container');
} else {
this.chatboxesview.openChat('online-users-container');
}
- });
+ }, this));
}, this));
}, xmppchat));