Use type=groupchat for chat states in muc

This commit is contained in:
Lance Stout 2013-10-08 08:14:23 -07:00
parent cc7921a54a
commit 17d3882a8a
1 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,7 @@ module.exports = BasePage.extend({
show: function (animation) { show: function (animation) {
BasePage.prototype.show.apply(this, [animation]); BasePage.prototype.show.apply(this, [animation]);
client.sendMessage({ client.sendMessage({
type: 'groupchat',
to: this.model.jid, to: this.model.jid,
chatState: 'active' chatState: 'active'
}); });
@ -35,6 +36,7 @@ module.exports = BasePage.extend({
hide: function () { hide: function () {
BasePage.prototype.hide.apply(this); BasePage.prototype.hide.apply(this);
client.sendMessage({ client.sendMessage({
type: 'groupchat',
to: this.model.jid, to: this.model.jid,
chatState: 'inactive' chatState: 'inactive'
}); });
@ -69,6 +71,7 @@ module.exports = BasePage.extend({
if (!this.typing) { if (!this.typing) {
this.typing = true; this.typing = true;
client.sendMessage({ client.sendMessage({
type: 'groupchat',
to: this.model.jid, to: this.model.jid,
chatState: 'composing' chatState: 'composing'
}); });
@ -81,6 +84,7 @@ module.exports = BasePage.extend({
if (this.typing && this.$chatInput.val().length === 0) { if (this.typing && this.$chatInput.val().length === 0) {
this.typing = false; this.typing = false;
client.sendMessage({ client.sendMessage({
type: 'groupchat',
to: this.model.jid, to: this.model.jid,
chatState: 'active' chatState: 'active'
}); });
@ -113,6 +117,7 @@ module.exports = BasePage.extend({
if (this.typing) { if (this.typing) {
this.typing = false; this.typing = false;
client.sendMessage({ client.sendMessage({
type: 'groupchat',
to: this.model.jid, to: this.model.jid,
chatState: 'paused' chatState: 'paused'
}); });