Gaurav Jain | 8 Mar 23:38 2015
Picon

'from' attribute in delay element of MUC history message has jid of occupant instead of room

Hi,

I am observing that from attribute of delay element in MUC history message has JID of the occupant instead of room.

As per xmpp.org/extensions/xep-0045.html#enter-history:


Discussion history messages MUST be stamped with Delayed Delivery (XEP-0203) [14] information qualified by the 'urn:xmpp:delay' namespace to indicate that they are sent with delayed delivery and to specify the times at which they were originally sent. The 'from' attribute MUST be set to the JID of the room itself.RoomJID = testGroup <at> conference.example.com
Occupant 1 =
erik <at> example.com/desktop
Occupant 2 = cyrus <at> example.com/desktop



<?
xml version="1.0" encoding="UTF-8"?> <message xmlns="jabber:client" from="testGroup <at> conference.example.com/cyrus" to="erik <at> example.com/desktop" type="groupchat"> <body>Hi</body> <thread>B9D31734-606D-43CD-B613-D5FF8DF7CAA3</thread> <subject /> <active xmlns="http://jabber.org/protocol/chatstates" /> <delay xmlns="urn:xmpp:delay" from="cyrus <at> example.com/desktop" stamp="2015-03-08T21:02:42.481Z" /> <x xmlns="jabber:x:delay" from="cyrus <at> example.com/desktop" stamp="20150308T21:02:42" /> </message>

Why is set to the JID of occupant instead of JID of room. Please help me understand.


Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 6 Mar 23:35 2015
Picon

In members-only room, when would a new member gets invitation

Hi,

I need a clarification on protocol. I did read 0045 on MUC. Just wanted to confirm.

If "owner" creates a members-only room and add a member with affiliation "admin", would the new member will automatically get an invitation

OR

the owner needs to send an invitation explicitly to the the newly added member as "admin".


Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Tobias Kräntzer | 2 Mar 20:41 2015
Picon

Berlin XMPP Meetup

Hello all,

I created a meetup group to gather the Berlin XMPP community. If you are interested, I would be happy if you join. This first meetup should be an informal round to get to know each other. Place and time yet to be determined.


Cheers,
Tobias

body>
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 2 Mar 01:30 2015
Picon

How to get regular C-style string from jlib

Hi,

All the xml elements returns value is format like

<<"1234567890123111">>

How can I get or convert this value to

"1234567890123111"


Best Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 1 Mar 22:21 2015
Picon

Crash while returning IQ packet from Custom IQ handler.

Hi,

* I have written a custom IQ handler
* That handler receives the IQ packet, sets its type = result and returns back as it output

While testing, custom IQ handler, I get the error mentioned below:

Sequence of events that happened:


* Client sent the below XML to the server.
* Server received it.
* Gives it to the call back function of my custom IQ handler.
* which logs it and make type = result for the IQ packet

* And the server crashes with the result below.

 CRASH REPORT Process <0.473.0> with 0 neighbours exited with reason: {badxml,{xmlel,<<"iq">>,[{<<"from">>,<<"some_id">>},{<<"to">>,<<"some_id">>},{<<"id">>,<<"12345">>},{<<"type">>,<<"result">>}],{xmlel,<<"query">>,[{<<"xmlns">>,<<"test:testing">>}],[{xmlel,<<"sales">>,[],[{xmlel,<<"type">>,[],[{xmlcdata,<<"my_test">>}]},{xmlel,<<"id">>,[],[{xmlcdata,<<"1234567890123111">>}]}]}]}},{function_clause,[{xml,'-element_to_string_nocatch/1-lc$^0/1-0-',[{xmlel,<<"query">>,[{<<"xmlns">>,<<"test...">>}],...}],...},...]}} in xml:element_to_string/1 line 122 in p1_fsm:terminate/8 line 760


<?xml version="1.0" encoding="UTF-8"?> <iq type="set" id="12345"> <query xmlns="test:testing"> <sales> <type>my_test</type> <id>1234567890123111</id> </sales> </query> </iq>


Relevant Code:

start(Host, Opt) ->
IQDisc = gen_mod:get_opt(iqdisc, Opt, fun gen_iq_handler:check_type/1,
one_queue),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_TEST, ?MODULE, process_sm_iq, IQDisc).

stop(Host) ->
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_TEST),
error_logger:info_msg("Stoping module 'custom_test' ", []).

process_sm_iq(From, To,
#iq{type = Type, sub_el = SubEl} = IQ) ->
error_logger:info_msg("Process_sm_iq request received ~p~n", [IQ]),
IQ#iq{type = result}.

Please provide pointers to help me resolve this issue.


Best Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 1 Mar 10:25 2015
Picon

error: {case_clause,undefined}

While adding a custom iq_handler, I get the following error:

I tried following Badlops' answer at

https://www.ejabberd.im/node/5035

I use git trunk.

options: []
 error: {case_clause,undefined}
[{gen_iq_handler,add_iq_handler,6,[{file,"src/gen_iq_handler.erl"},{line,64}]},
 {mod_iqtest,start,2,[{file,"mod_iqtest.erl"},{line,16}]},
 {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,82}]},
 {lists,foreach,2,[{file,"lists.erl"},{line,1336}]},
 {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,67}]},
 {application_master,start_it_old,4,
                     [{file,"application_master.erl"},{line,272}]}]
2015-03-01 01:17:48.596 [critical] <0.37.0> <at> gen_mod:start_module:95 ejabberd initialization was aborted because a module start failed.


Please help me resolve this issue.



Best Regards,



_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 28 Feb 17:06 2015
Picon

why is mod_offline.handle_info implemented?

Hi,

My understand is that when we add event hook, then we specify the function that will be called when the event happens

https://www.process-one.net/en/wiki/ejabberd_events_and_hooks/
  • The Module and Function parameters describe the hook to be called when the event occurs.
But I notice that in mod_offline.erl, handle_info is implemented as well.

* Would you be able to tell why is hadle_info implemented in mod_offline.erl?
* How will this be called?
* And under which situtations?


--------------------------------------------------------------------------------------
handle_info(#offline_msg{us = UserServer} = Msg, State) ->
    #state{host = Host,
           access_max_offline_messages = AccessMaxOfflineMsgs} = State,
    DBType = gen_mod:db_type(Host, ?MODULE),
    Msgs = receive_all(UserServer, [Msg], DBType),
    Len = length(Msgs),
    MaxOfflineMsgs = get_max_user_messages(AccessMaxOfflineMsgs,
                                           UserServer, Host),
    store_offline_msg(Host, UserServer, Msgs, Len, MaxOfflineMsgs, DBType),
    {noreply, State};
--------------------------------------------------------------------------------------

Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 28 Feb 06:00 2015
Picon

jiffy module not loaded

I get this error in logs.

gen_server ..... terminated with reason: {'module could not be loaded',[{jiffy,encode

I am on following ejabbard git: https://github.com/processone/ejabberd.git

I checked there is no jiffy so in priv or anywhere in my ejabberd install directory

I also checked this thread but it did not help me

https://github.com/processone/ejabberd/issues/309


Please help me resolve this issue.

Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Mickaël Rémond | 27 Feb 19:21 2015
Picon

ejabberd documentation site effort

Hello,

We have launched a new documentation site for ejabberd and open the
repository for the website on Github. It means you can now send a pull
request to improve the brand new (and beautiful) ejabberd documentation
site.

You can find more details on my blog post:
https://blog.process-one.net/ejabberd-new-documentation-site-a-community-effort/

The documentation site repository is on Github:
https://github.com/processone/docs.ejabberd.im

You can now star, fork and send PR to contribute to the new ejabberd doc
site.

Enjoy !

--

-- 
Mickaël Rémond
 http://www.process-one.net/
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 27 Feb 18:21 2015
Picon

Which config file to use to set env variables.

I use a library that uses following code:

get_env(K, Def) ->
  case application:get_env(appname, K) of
    {ok, V} -> V;
    _ -> Def
  end.

Could you please tell me which config file I should use to get environment variable via

application:get_env(appname, K) of


Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 27 Feb 05:03 2015
Picon

How many instances of any module can run at the same time

HI,

Shorter version of my previous question:

How many instances of any module can run at the same time?

Is there a documentation of ejabberd request handling?

Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd

Gmane