ejabberd

XMPP client using Smack 4.1 giving NullPointerException during login

岁酱吖の 提交于 2019-11-29 02:30:18
问题 I am trying to use Smack 4.1.0-rc3 for implementing a java xmpp client which connects to a ejabberd xmpp server. I am using the following code for connecting to the server. XMPPTCPConnectionConfiguration connConfig = XMPPTCPConnectionConfiguration .builder() .setServiceName("example.com") .setHost("192.168.56.101") .setPort(5222) .setCompressionEnabled(false) .setSecurityMode(SecurityMode.disabled) .setHostnameVerifier(new HostnameVerifier() { public boolean verify(String arg0, SSLSession

Create ejabberd user from PHP

馋奶兔 提交于 2019-11-28 19:46:51
I need to create an ejabberd user from a PHP script. I also need to be able to add the new user to a predefined shared roster. Should I just call ejabberdctl using exec() or is there a better way? ejabberdctl is by far the easiest in this specific case. The other options are: Implement a full client XMPP in PHP (!) Implement a module in Erlang that proxies the requests: the PHP<-->Erlang communication would need to be through a socket and lots of marshaling would be involved (!) Andrew Ensley Here's my final solution: Thanks to jldupont's advice that ejabberdctl would be the easiest solution,

xmpp messages are lost when client connection lost suddently

夙愿已清 提交于 2019-11-28 19:21:15
问题 I am using ejabberd server and ios xmppframework. there are two clients, A and B. When A and B are online, A can send message to B successfully. If B is offline, B can receive the message when B is online again. But when B is suddenly/unexpectedly lost connection, such as manually close wi-fi, the message sent by A is lost. B will never receive this message. I guess the reason is that B lost connection suddenly and the server still think B is online. Thus the offline message does work under

How to fully integrate XMPP on a web site with registered users

一世执手 提交于 2019-11-28 15:26:43
问题 We have a social networking site where people have contacts and we want it to be integrated with XMPP. We currently use ejabberd XMPP server. Here are my questions: How to properly create account? Right now, what I'm thinking is on user registration on our web app, we'd call a script that would execute an ejabberd command to create a user. User authentication. Upon user login on our website, the user would be automatically logged in on the chat system. How do you do this on the client side

ejabberd how to compile new module

▼魔方 西西 提交于 2019-11-28 13:14:09
Here I found the code: erlc -I ~/ejabberd-2.1.13/lib/ejabberd-2.1.13/include -pa ~/ejabberd-2.1.13/lib/ejabberd-2.1.13/ebin mod_my.erl But it did not work? Here are steps to add your custom module into ejabberd put your module into ejabberd/src folder. come to ejabberd directory in terminal and run command $ sudo make it will show you that your module is compiled. Now run $ sudo make install Add your module into config file at /etc/ejabberd/ejabberd.yml restart your ejabberd and your custom module will be running. Just drop the module in the ejabberd's src/ folder then "make". Nothing special

GroupChat Push Notification on XMPP

ⅰ亾dé卋堺 提交于 2019-11-28 12:50:06
问题 We are developing an xmpp application on IOS and Android. We are using ejabberd as the xmpp server and we are also using mod_interact (https://github.com/adamvduke/mod_interact) to inform our webservers to send push notifications to clients for their offline messages: Flow is like this: Sender sends the message to ejabberd Ejabberd receives the message and check if the receipant is online If the receipant is offline ejabberd saves the offline message mod_interact works when an offline message

Chat App for Android using a XMPP Server and Firebase Cloud Messaging for Push Notifications

瘦欲@ 提交于 2019-11-28 05:34:49
问题 I'm trying to send custom IQ from register device to ejabberd xmpp server for FCM configuration but still i can't received FCM notification and receiving Error like "user not registered at XMPP". Step 1 : Created class for Custom IQ public class IQGetSomething extends IQ { public static final String ELEMENT = "push"; public static final String NAMESPACE = "p1:push"; String refreshedToken; String userName; public IQGetSomething(String refreshedToken,String userName) { super(ELEMENT, NAMESPACE)

how to open ejabberd server to public

我们两清 提交于 2019-11-28 02:18:42
问题 i recently installed ejabberd on Ubuntu 12.04 LTS. I made the necessary configuration and am able to connect using a xmpp client PSI on a different computer using LAN ip. Now I want to allow my ejabberd server to be accessible from the public url, but have been unsuccessful. I have done the following: Assuming my public domain is example.domain.com and the public IP is 123.123.10.210 opened port 5222 5269 and 5280. iptables -A INPUT -p tcp --dport 5222 -j ACCEPT iptables -A INPUT -p tcp -

iOS XMPP framework get all registered users

爷,独闯天下 提交于 2019-11-27 03:00:12
问题 In my chat application I want to get all online registered users. So everybody and not only people in my roster which is achieved with this code: - (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence { // a buddy went offline/online NSString *presenceType = [presence type]; // online/offline NSString *myUsername = [[sender myJID] user]; NSString *presenceFromUser = [[presence from] user]; if (![presenceFromUser isEqualToString:myUsername]) { if ([presenceType