ejabberd

converting string to tuple in erlang .any pointer?

烈酒焚心 提交于 2019-12-24 14:06:02
问题 how to convert string to tuple in erlang? f.e A="{"hi","how"}" and i want it to converted into B={"hi","how"}. when i call function list_to_tuple(A) it gives output as:-{123,60,60,34,106,105,100,34,62,62,44,34,104,105,34,125} rather than {"hi","how"} 回答1: You should use erl_scan module to tokenize the string and erl_parse to convert the tokens to a erlang term. % Note the '.' at the end of the expression inside string. % The string has to be a valid expression terminated by a '.'. 1> Str = "{

error 400 bad request with XEP-0055?

你离开我真会死。 提交于 2019-12-24 12:24:03
问题 I got possible fields from my server: <iq xmlns="jabber:client" from="vjud.company.com" to="testuser@company.com/iPhone" id="search1" type="result"><query xmlns="jabber:iq:search"> <instructions>You need an x:data capable client to search</instructions> <x xmlns="jabber:x:data" type="form"> <title>Search users in vjud.company.com</title> <instructions>Fill in the form to search for any matching Jabber User (Add * to the end of field to match substring) </instructions> <field type="text-single

ejabberdctl does not work from PHP

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 12:13:34
问题 I am trying to call ejabberdctl from a PHP file, but it is failing with the following error : Failed RPC connection to the node ejabberd@localhost: nodedown The node is running, i have checked this by logging into the server. When the php script is run this is the error i see in /opt/ejabberd-2.1.2/logs/ejabberd.log shows : =ERROR REPORT==== 2010-03-11 15:08:07 === ** Connection attempt from disallowed node 'ejabberd-ctl@localhost' ** Server Details : Ejabberd Version : 2.1.2 OS : Ubuntu 9.10

Ejabberd can't register new user

旧街凉风 提交于 2019-12-24 11:34:34
问题 I am on mac using latest version of mac OS (Mavericks.) I downloaded ejabberd 13.12 for mac, installed it, and started it through terminal. Now i can open it in browser (i am using mozilla firefox 26 and latest safari). and went to admin console. Everything seems fine, i can log in with my user name and password (which i provided during jabber installation). Now i went to access control lists, and try to add additonal users. Problem is i can't. In mozilla i get error message, that connection

Erlang convert ejabberd XML structure to string

99封情书 提交于 2019-12-24 11:28:35
问题 The Erlang representation of my XML message is like the below: {xmlel,<<"message">>,[{<<"xml:lang">>,<<"en">>},{<<"type">>,<<"chat">>},{<<"to">>,<<"x">>},{<<"id">>,<<"aaf6a">>}],[{xmlcdata,<<"\n">>},{xmlel,<<"body">>,[],[{xmlcdata,<<"wewe">>}]},{xmlcdata,<<"\n">>},{xmlel,<<"active">>,[{<<"xmlns">>,<<"http://jabber.org/protocol/chatstates">>}],[]},{xmlcdata,<<"\n">>},{xmlel,<<"time">>,[{<<"xmlns">>,<<"urn:server-time">>},{<<"stamp">>,"2015-06-23T22:48:24Z"}],[]}]} How can I convert it into

How to connect Ejabberd or MongooseIM with Node.js (or Django)

ぐ巨炮叔叔 提交于 2019-12-24 10:22:37
问题 I want to develop a backend server for a chat application using node.js (or Django) and Ejabberd or MongooseIM. And consume this API on a React Native app that should have push notifications. The idea is to manage the user profile and metadata and also the authentication ( OAuth 2.0 - social login ) through my own server, then let the management of the chat stuff to the Ejabberd or MongooseIM server. The problems come on how to make the connection between the servers. I want to login through

i am getting a error when trying to register a user using smack api(4.2) on android device on ejabberd (17.07)

落爺英雄遲暮 提交于 2019-12-24 05:04:41
问题 I tried to find the reason of the error but cannot found it. If anyone can suggest a way it will be highly appreciated. Earlier I was using ejabberd version 2.1 with default mnesia, which was working fine. I was able to register users from the android app. But now when I installed new ejabberd 17.07 with mysql, it gave me error as follow: Connection XMPPTCPConnection[not-authenticated] (5) closed with error org.jivesoftware.smack.XMPPException$StreamErrorException: not-authorized You can read

How does whatsapp Keeps its eJabberd/XMPP server connected when the app is Closed?

久未见 提交于 2019-12-24 03:14:07
问题 How does Whatsapp keep its connection to the socket when the app is totally closed off. Does Whatsapp use GCM or APNS push to trigger the App to sync with the Ejabberd?? Some people say it always stay connected(I am pretty new to this) but i tested i rebooted my phone, clear ram, AppManager forced close Whatsapp, it still receives the messages. So wondering can you make code runs on the OS level to keep the connections when everythings closed? Or it just use the GCM for triggers? Isnt the

Creating new user with Smack 4.2.0-beta1 on ejabberd throws XMPP Exception: forbidden - auth

ぐ巨炮叔叔 提交于 2019-12-24 02:44:32
问题 I am doing Chat application with smack . I am new for this technology. I have created some manual users from Ejabberd server. Using those users I have done one to one chat and group chat. But I tried to create new user from android code But I am getting this below error XMPPError: forbidden - auth 08-02 08:23:36.273 31097-31097/com.agarangroup.hello W/System.err: at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232) 08-02 08:23:36.273 31097-31097/com

Which one should I choose AMQP or XMPP for real-time browser-based game?

自作多情 提交于 2019-12-23 09:27:12
问题 I'm choosing between AMQP (RabbitMQ) vs XMPP (eJabberd) for my browser-based flash-free javascript powered real-time turn-based game. I don't know much about AMQP and XMPP protocol. I would like to use PHP for user-authorization and some data store-retrieve with MySQL. As far as I found out, RabbitMQ has PHP clients but eJabberd not. What I understood is javascript client calls PHP script and manipulate necessary processing and then pass to AMQP or XMPP server to pass the data to opponent