Open jzhw0130 opened 6 years ago
The library does not support the feature. Need to do by yourself. Code as follows:
Join a room:
var builder = require('xmlbuilder'); var xml = builder.begin() .ele('presence',{'to':
${roomJID}/${nickName}
}) .ele('x', {'xmlns':'http://jabber.org/protocol/muc'}) .end({ pretty: true}); XMPP.sendStanza(xml.toString());
Send group message:
var builder = require('xmlbuilder');
var xml = builder.begin()
.ele('message',{'to':`${roomJID}`, type:'groupchat'})
.ele('body', {}, message)
.end({ pretty: true});
XMPP.sendStanza(xml.toString());
By the way, for the custom IQ message, Android needs to add custom Provider to support. Otherwise, parse will fail, you will get a UnParsed IQ.
Hello, I also met the same problem, through the way you mentioned that the group chat messages have been solved, but can not monitor the group chat messages, do you have a similar problem?
Sorry, I have stopped using the library. Just use the service from PubNub.
@CocktailZY hello, how to monitor the group chat messages? Have you solved the problem?
@heachou see my pull-request "multi-chat rooms"
@andrzejbe How can I use your pull request into my project? is there any npm install available? or do I need to download all project?
@vinayakb-pits - there's no npm as I (still) hope it will be merged with master branch at some point ;) for now you can use it as follows:
@import KissXML = replace with => #import "KissXML.h" @import CocoaAsyncSocket = replace with => #import "GCDAsyncSocket.h"
hope it helps
@andrzejbe I added your code as a library in my project and add "react-native-xmpp": "file:./src/libs/react-native-xmpp-master", in package json . It's working perfectly. Thank you very much
Now I can connect the server, send message fro another account. If I want to join a chat room, chat with multi-users, how to implement?
Does the library support? If yes, which API should use?
Thanks