diff util.js @ 34:dcf1f09f8cee

Add message to publish module and various fixes.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 05 Nov 2010 15:31:13 +0100
parents 60c80751cfa5
children
line wrap: on
line diff
--- a/util.js
+++ b/util.js
@@ -50,3 +50,8 @@ util.toBareJID = function(jid) {
 	var j = new JID(jid);
 	return j.bare;
 };
+
+util.toResource = function(jid) {
+	var j = new JID(jid);
+	return j.resource;
+};