[ejabberd] Can someone tell me what am I doing wrong?

Matthias Rieber ml-erlang at zu-con.org
Thu Apr 30 17:05:06 MSK 2015


Am 2015-04-30 15:09, schrieb Santiago Ignacio Poli:

> Recently I've been trying to implement my own IQ Handlers in ejabberd. 
> I've been using the hook mechanism for some time now but I think IQ 
> Handlers are more suitable for the features I need to implement.
> I've made a simple IQ handler to learn how to do this and encountered a 
> problem: Every time I send my custom IQ from my client, ejabberd throws 
> this exception (and don't return anything to the client):

I'm not sure, maybe you need to return an #xmlel{} try:

process_local_iq(From,_ ,IQ) ->
     User = From#jid.luser,
     error_logger:error_msg("User: ~s", [User]),
     jlib:iq_to_xml(IQ#iq{type = result,
       sub_el =
          name = <<"query">>,
          attrs = [{<<"xmlns">>, ?IQ_CUSTOM}, {<<"test">>,1}],
          children = []


More information about the ejabberd mailing list