ejabberd-module

Ejabberd - Run SQL Query for Custom Command

心已入冬 提交于 2020-05-16 03:13:28
问题 I'm trying to make a custom command in mod_admin_extra.erl . to fetch messages between 2 JIDs. My command will look like this:- ejabberdctl get_messages HOST FROM TO START_TIME END_TIME The SQL query will be like:- select * from archive where (username = FROM and bare_peer = TO) OR (username=TO and bare_peer = FROM) where created_at BETWEEN START_TIME AND END_TIME; I went through this thread to understand how IQ query works and want to build a similar sort of a thing via the command and API.

what does feature not implemented response mean

时间秒杀一切 提交于 2019-12-25 01:45:52
问题 I am trying to send a custom IQ to ejabberd server from android app and I have this following class public class IQCustom extends IQ { public final static String childElementName = "query"; public final static String childElementNamespace = "jabber:iq:conversations"; public IQCustom(String userFrom, String server) { super( childElementName, childElementNamespace ); this.setType(Type.get); setTo( server ); setFrom( userFrom ); } @Override protected IQChildElementXmlStringBuilder

How to resolve undef error in ejabberd hook

雨燕双飞 提交于 2019-12-24 14:52:54
问题 I have added a customized module named mod_confirm_delivery in ejabberd which has compiled and added successfully but when i am sending a message an error is coming in my ejabberd error log file, That is: 2016-03-15 17:03:38.306 [error] <0.2653.0>@ejabberd_hooks:run_fold1:368 {undef,[{mod_confirm_delivery,send_packet,[{xmlel,<<"iq">>,[{<<"xml:lang">>,<<"en">>},{<<"type">>,<<"get">>},{<<"id">>,<<"aacfa">>}],[{xmlcdata,<<"\n">>},{xmlel,<<"query">>,[{<<"xmlns">>,<<"jabber:iq:roster">>}],[]},

mod_zeropush not working with ejabberd 16.03

戏子无情 提交于 2019-12-12 02:18:38
问题 I am working with mod_zeropush and i was working fine with 15.07 until i switched to the ejabberd version 16.03. I am using Ubuntu OS 14.04 Copied all beam files again to ebin directory it iis last error === 2016-05-12 15:40:08.706 [error] <0.499.0>@ejabberd_hooks:run1:332 {undef,[{xml,get_tag_attr_s,[<<"type">>,{xmlel,<<"message">>,[{<<"type">>, <<"chat">>},{<<"image">>,<<"http://example.com/web-services/user_images /personal_image/support_team_01.03.2016.png">>},{<<"id">>, <<

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"). %% ==================================

XMPP - Roster Subscription Explaination

风格不统一 提交于 2019-12-11 03:08:45
问题 Consider I've 2 users Alice and Bob on my Jabber Server. To add into the rosters with subscription as both , I need to do the following steps: Alice sends a subscription request to Bob. When Bob receives the request, he approves it. Bob may also be interested in Alice's presence, so he subscribes to her. And Alice needs to approve Bob's request. BUT Now consider, Bob was not on the server, i.e. he is unregistered and Alice tries to add him into her roster. Following are the steps which will

ejabberd and Erlang installation with lager_transform undefined

旧城冷巷雨未停 提交于 2019-12-10 17:56:52
问题 I am new to Erlang, I have been trying to install Erlang and ejabberd on EC2 ubuntu machine, everything went well till I started compiling some external modules in ejabberd. It started throwing error "undefined parse transform 'lager_transform'". I tried everything which is as below : Did rebar get-deps, make clean, make deps, make install. After this I am able to see that lager_transform.beam is made and present in //lib/ folder. Checked rebar.config file, it had lager deps on top, which is

Ejabberd user registration command fails with {error,access_rules_unauthorized}

蹲街弑〆低调 提交于 2019-12-07 23:35:36
问题 I've been trying to set up an XMPP server using ejabberd on windows. every time I try to register a user in ejabberd with this command: ejabberdctl register admin localhost admin it gives me this error: {error,access_rules_unauthorized} I've installed the ejabberd using its binary installer and according to "install.log" file, the installer also fails to create a user due to the same error. Part of the log file: E:\Program Files\ejabberd-16.08\bin>bash ejabberdctl register "admin" "localhost"

Ejabberd user registration command fails with {error,access_rules_unauthorized}

白昼怎懂夜的黑 提交于 2019-12-06 11:30:07
I've been trying to set up an XMPP server using ejabberd on windows. every time I try to register a user in ejabberd with this command: ejabberdctl register admin localhost admin it gives me this error: {error,access_rules_unauthorized} I've installed the ejabberd using its binary installer and according to "install.log" file, the installer also fails to create a user due to the same error. Part of the log file: E:\Program Files\ejabberd-16.08\bin>bash ejabberdctl register "admin" "localhost" "admin" {error,access_rules_unauthorized} ejabberd.yml config file: access_rules: register: - allow I