Mercurial > eldonilo > lightstring
diff plugins.js @ 16:6707f450549e
fix several problems
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Mon, 16 Jan 2012 16:55:40 +0100 |
parents | 08a8d8c4c324 |
children | fc577e5b2f4a 7fcccf59e6ec |
line wrap: on
line diff
--- a/plugins.js +++ b/plugins.js @@ -16,6 +16,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +//////////// +//Presence// http://xmpp.org/rfcs/rfc6121.html#presence +//////////// +Lightstring.stanza.presence = function(aPriority) { + if(aPriority) + return "<presence><priority>"+aPriority+"</priority></presence>"; + else + return "<presence/>"; +}; +Lightstring.presence = function(aConnection, aPriority) { + aConnection.send(Lightstring.stanza.presence(aPriority)); +}; + ////////// //Roster// //////////