Routing offline messages to django

Hi,
I wrote a django_module and a django custom command to send offline messages to django.

http://nullable.de/post/2748889136/routing-ejabberd-xmpp-offline-message...

It's currently in german but you should get the idea but looking at the code.

Have Fun

Best,
Henrik P. Hessel

Hi Henrik, I'm looking for an

Hi Henrik,

I'm looking for an expert to do a simple ejabberd customization project to do the following:

* Additionally call a command line shell script when encountering an offline-message
* Use MD5 Challenge for login authentication
* 2 other minor customizations

Would you be interested?

Thanks,

John.

Hi, I 'm trying to make a

Hi, I 'm trying to make a module which mimic sending offline message push to prowl, code is here : http://www.unsleeping.com/2010/07/31/prowl-module-for-ejabberd/ , I changed the original

 "httpc:request(post...," to httpc:request(post, 
	  {
	  "http://www.snee.com/xml/crud/posttest.cgi",
	  [],
	  "application/x-www-form-urlencoded", 
	  "fname=FIRST&lname=LAST"
	  },
	  [],[])

The problem is that it could run well in Erlang bash with {ok, HTTP 200 OK...} but when I put that in module ( I registered the module { modules, [ ... { mod_offline_push, [] } ]} ) and always got error :

=ERROR REPORT==== 2011-09-23 22:21:49 ===
E(<0.2856.0>:ejabberd_hooks:294) : {undef,
                                    [{lists,keyfind,
                                      ["tyrins@ejlocalhost",1,
                                       [{"admin@ejlocalhost",
                 "78,71,79,67,226,128,153,115,32,77,97,99,66,111,111,107"},
                                        {"tyrins@ejlocalhost",
                                         "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
                                        {"test@ejlocalhost",
                                         "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}]]},
                                     {mod_offline_push,send_notice,3},
                                     {ejabberd_hooks,run1,3},
                                     {ejabberd_sm,route,3},
                                     {ejabberd_local,route,3},
                                     {ejabberd_router,route,3},
                                     {ejabberd_c2s,session_established2,2},
                                     {p1_fsm,handle_msg,10}]}
running hook: {offline_message_hook,
                  [{jid,"admin","ejlocalhost",
                       [78,71,79,67,226,128,153,115,32,77,97,99,66,111,111,
                        107],
                       "admin","ejlocalhost",
                       [78,71,79,67,226,128,153,115,32,77,97,99,66,111,111,
                        107]},
                   {jid,"tyrins","ejlocalhost",[],"tyrins","ejlocalhost",[]},
                   {xmlelement,"message",
                       [{"type","chat"},{"to","tyrins@ejlocalhost"}],
                       [{xmlelement,"body",[],[{xmlcdata,<<"s">>}]}]}]}

Could somebody shed me some light, why is it failed in module while it run well in bash :( ?

Don't use lists:keyfind

Don't use lists:keyfind because it was introduced in recent Erlang R13A, and probably you use an older Erlang version.

Solution: For example, if you have a line like this:
{Int, Level, Desc} = lists:keyfind(Level, 2, LOG_LEVELS),

replace it with a line like this:
{value, {Int, Level, Desc}} = lists:keysearch(Level, 2, LOG_LEVELS),

Syndicate content