Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strophe MUC example

Tags:

xmpp

strophe

Does anyone have an example code for a join,changenick, ...etc functions calls in Strophe muc extension ?

I tried to do this myself not sure how do i call the extensions functions, and add the plugin to the js, is it adding

like image 669
mahen3d Avatar asked Dec 07 '22 16:12

mahen3d


2 Answers

You need to include the strophe.muc.js in our html file and after you established a Strophe connection, you can call the muc methods with conn.muc.foobarMethod() where conn is the established Strophe connection and foobarMethod is the method you'd like to call.

Instead of trying to build everything on your own (and from your question I assume that you don't have the relevant know-how), try an already built js xmpp client like Candy which is also built upon Strophe.js.

like image 155
Michael Weibel Avatar answered Jan 15 '23 20:01

Michael Weibel


Candy is a full blown MUC client based on Strophe. The code is excellent and easy to read. I suggest to download it and study the code: http://candy-chat.github.com/candy/

Alex

like image 23
Alex Avatar answered Jan 15 '23 21:01

Alex