Javascript based XMPP chatclient using strophe js

2019-03-18 01:46发布

问题:

I want to make a simple javascript-based XMPP client. I stumbled upon 'strophe js', which should make my life easier when it comes to XMPP but I find the documentation a bit.. uncomplete. It has an example on how to connect/disconnect but that's pretty much it.

I need to get a list of contacts, send and receive messages... how do I do this?

Actually: where can I find a tutorial or an example on how to do this? (no need to write a full tut here :)

回答1:

You can find your requirement related to chat using stropher js for XMPP protocol on this below working github code.

https://github.com/metajack/profxmpp

Look on chap :06 demo (GAB Tut).

It will satisfy all your requirement related to

  • one to one chat.
  • Roster list (Friend list),
  • Send friend request,
  • In coming request approval.
  • Start one to one chat etc...

    and all important demo also included

Let me know you have any query in this demo. :) :)



回答2:

Check out this project : https://conversejs.org/

This is a really good implementation of using Strophe.js and also uses Backbone Js to to ease it up. Hope it helps.