Add to the MUC library support for sending private messages

Thu, 18 Mar 2010 16:05:59 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 18 Mar 2010 16:05:59 +0000
changeset 20
bd1d350ab61c
parent 19
41a3c9d41e6a
child 21
b691536ed125

Add to the MUC library support for sending private messages

js/xmpp_muc.js file | annotate | diff | comparison | revisions
--- a/js/xmpp_muc.js	Thu Mar 18 15:53:39 2010 +0000
+++ b/js/xmpp_muc.js	Thu Mar 18 16:05:59 2010 +0000
@@ -45,6 +45,12 @@
 			.c("body").t(message||""));
 	},
 
+	send_private_message: function (nick, message)
+	{
+		return this.send_stanza($msg({to: this.jid+"/"+nick, type: "chat"})
+			.c("body").t(message||""));
+	},
+
 	send_stanza: function (stanza)
 	{
 		return this.conn.send(stanza.tree());

mercurial