Menu
  • HOME
  • TAGS

How to run queries from MongooseIM module

erlang,mongoose-im

The errors you get are not exactly SQL or MongooseIM specific errors. They are erroneous uses of io_lib:format/2 or a similar string formatting function. This error: 2015-03-09 16:37:11.598 [debug] <0.763.0>@mod_zeropush:count_msg:102 FORMAT ERROR: "Count = ~s" [{selected,[<<"count">>],[{<<"5">>}]}] relates to: ?DEBUG("Count = ~s", [Count]) But Count is neither a string, nor a...

Ejabberd error while xml,append_subtags

erlang,ejabberd,mongoose-im

You're passing Packet (a tuple: {From, To, XML}) to xml:append_subtags/2 while you should pass just XML. Your add_child/1 should look more like: add_child({From, To, XML} = Packet) -> Tag = {<<"a">>, <<"b">>}, NewPacket = {From, To, xml:append_subtags(XML, [Tag])}, ?INFO_MSG(" To party: ~p~n",[To]), NewPacket. I also changed {"a", "b"} to {<<"a">>,...

Erlang convert ejabberd XML structure to string

erlang,ejabberd,mongoose-im

You can use ejabberd xml:element_to_binary/1:...

Message Archiving Management on MongooseIM returning feature not implementing

mongoose-im

You're addressing the IQ to exampleserver.com while you should either address it to bare JID of the sender (i.e. [email protected]) or omit the to attribute completely - then the server will assume it's directed towards the sender's bare JID. Section 10.3.3 of RFC-6120 describes handling of IQs with or without...

MongooseIM simple module event not getting handeled

erlang,mongoose-im

So your example is actually a bit tricky, because of how the filter_packet hook works. You picked the worst hook to register for on your first attempt ;) If you look into ejabberd_router:do_route, you'll see that filter_packet is run without a Host parameter -- it is a global hook, so...

MongooseIM module not getting variables from Packet

php,xmpp,ejabberd,mongoose-im

offline_message_hook is only called when the server is routing a message to a user who is not online. user_send_packet is run every time the server receives a stanza from a client. This might explain why the handler is not run, though it depends on how you test. There's an article...

XMPP: count of unread messages

xmpp,openfire,ejabberd,mongoose-im

What you are trying to do is to basically store a counter of unseen stuff in your account. I think you do not need flexible offline retrieval as when you connect the messages would simply become unseen. You thus only have to deal with one case: Unseen. I will reply...