ejabberd

Presence Stanze for ejabberd NOT working via mod_rest module

空扰寡人 提交于 2019-12-11 20:06:18
问题 Currently i am using ejabberd 14.05 server and using it`s mod_rest module to update the presence of the user from server based on a certain condition from a 3rd party web service. But i am not able to post the presence stanza to update the presence of user. Below are my finding. command using to invoke the presence stanza via mod_rest. curl --verbose --data "World" -X POST servername:5280/rest/ -H "Content-Type: text/xml" -H "Accept: application/xml" logs. ==> error.log <== 2014-12-12 03:00

How to format xmpp presence stanza to join a MUC room

懵懂的女人 提交于 2019-12-11 19:28:25
问题 I'm trying to figure out how to format a presence stanza being sent to a room, and I'm not following the examples I've found online. presence_stanza = f"<presence xmlns='jabber:client' from='{user_id}@conference.domain.com/{what_goes_here} to='{room_id}@conference.domain.com'/>" In particular I'm unsure what the ID/string that follows the / in the from address. For reference: https://www.ejabberd.im/node/5189/index.html Ejabberd not sending presence stanza to other roster members 回答1: You

Module to handle custom iq stanzas does not work with ejabberd-18.09

倾然丶 夕夏残阳落幕 提交于 2019-12-11 19:06:35
问题 I am trying to move to ejabberd-18.09 from ejabberd-17.03. I have this module so that I can send custom iq stanzas to ejabberd. -module(mod_test_custom). %% ==================================================================== %% API functions %% ==================================================================== -export([start/2, stop/1, process_local_iq/3,depends/2,mod_opt_type/1]). -include("ejabberd.hrl"). -include("logger.hrl"). -include("xmpp.hrl"). %% ==================================

How do I append custom data in the body of a xmpp message in ejabberd

偶尔善良 提交于 2019-12-11 17:56:11
问题 I have set up a chat settong using Pidgin and Ejabberd.I have written down a custom module in ejabberd using user_send_packet : ejabberd_hooks:add(user_send_packet, _Host, ?MODULE, myMessage, 95), The function myMessage is as follows: myMessage({Packet, C2SState})-> PacketType=xmpp:get_name(Packet), case PacketType of <<"iq">>-> ok; <<"presence">>-> ok; <<"message">>-> Sum=2+2, ?INFO_MSG("Sum is ~p~n",[Sum]) end, {Packet,C2SState}. Basically what this function does is that whenever someone

How to implement a list of chats with XMPP

流过昼夜 提交于 2019-12-11 15:42:38
问题 I have Ejabberd server and mobile iOS/Android apps. I want to build a simple Chat app with something like 2 screens: List of chats Screen with messages of particular chat I have an issue with the List of chats implementation. I use XEP-0313: Message Archive Management to store chat history and it suites very well for my 2nd screen - screen with messages of particular chat. But I can't find a proper way to show a list of chats I have an idea to merge all user's contacts (roster) + group rooms

Ejabberd sbin/ejabberdctl start(No such file or directory)

泄露秘密 提交于 2019-12-11 14:15:01
问题 When i was installing Ejabberd, it gave an error saying it wasnt installed successfully. But then i have the folder my-ejabberd with all the folders in it. I am not sure if thats 100% installed, but when i try to start up the server, with the command line sbin/ejabberdctl start, it says No such file or directory. I am running on Mac OS 10.8.5. Not sure what the problem is. Any Ideas? Edit This is the error from Terminal bin/ejabberdctl: line 24: getent: command not found /Users/clark/my

ejabberd: Why is Websocket connection not opening

依然范特西╮ 提交于 2019-12-11 11:07:17
问题 I am trying to make a websocket connection from Strophe.js to Ejabberd but ejabberd is not able to make a websocket connection. Here is the detail: ejabberd version : 16.02 Web socket headers General Request URL:ws://localhost:5280/websocket Request Method:GET Status Code:101 Switching Protocols Response Headers Connection:Upgrade Sec-WebSocket-Accept:BHzI4XS3kPDZJhNt4BVAaGDvv8I= Sec-Websocket-Protocol:xmpp Upgrade:websocket Request Headers Accept-Encoding:gzip, deflate, sdch Accept-Language

Losing messages over lost connection xmpp

Deadly 提交于 2019-12-11 11:04:59
问题 i went through this question Lost messages over XMPP on device disconnected but there is no answer. When a connection is lost due to some network issue then the server is not able to recognize it and keeps on sending messages to disconnected receiver which are permanently lost. I have a workaround in which i ping the client from server and when the client gets disconnected server is able to recognize it after 10 sec and save further messages in queue preventing them from being lost. my

create forum with xmpp pubsub

狂风中的少年 提交于 2019-12-11 10:39:42
问题 i just wanted to know if I want a collection node act as topic and this collection node has leaf nodes for different questions wouldn't it be highly inefficient to have a dedicated leaf nodes for each question (collection node-leaf1, leaf2, ..., leafN)? This will end up with thousands of different leaf nodes in the database for different questions and not just items (for questions and answers) in one leaf node per topic (collection node)... (collection node-leaf node (where Q&A with big chunk