Remove usage of muc.groupchat. updates #307
This commit is contained in:
parent
762e2bac04
commit
acd3463abd
12
converse.js
12
converse.js
@ -2414,13 +2414,23 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
createChatRoomMessage: function (text) {
|
createChatRoomMessage: function (text) {
|
||||||
|
var msgid = converse.connection.getUniqueId();
|
||||||
|
var msg = $msg({
|
||||||
|
to: this.getRoomJID(),
|
||||||
|
from: converse.connection.jid,
|
||||||
|
type: 'groupchat',
|
||||||
|
id: msgid
|
||||||
|
}).c("body").t(text).up()
|
||||||
|
.c("x", {xmlns: "jabber:x:event"}).c("composing");
|
||||||
|
converse.connection.send(msg);
|
||||||
|
|
||||||
var fullname = converse.xmppstatus.get('fullname');
|
var fullname = converse.xmppstatus.get('fullname');
|
||||||
this.model.messages.create({
|
this.model.messages.create({
|
||||||
fullname: _.isEmpty(fullname)? converse.bare_jid: fullname,
|
fullname: _.isEmpty(fullname)? converse.bare_jid: fullname,
|
||||||
sender: 'me',
|
sender: 'me',
|
||||||
time: moment().format(),
|
time: moment().format(),
|
||||||
message: text,
|
message: text,
|
||||||
msgid: converse.connection.muc.groupchat(this.model.get('jid'), text, undefined, String((new Date()).getTime()))
|
msgid: msgid
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user