ejabberd - Comments for "Routing offline messages to django" https://www.ejabberd.im/node/4499 en Don't use lists:keyfind https://www.ejabberd.im/node/4499#comment-57871 <p>Don't use lists:keyfind because it was introduced in recent Erlang R13A, and probably you use an older Erlang version.</p> <p>Solution: For example, if you have a line like this:<br /> {Int, Level, Desc} = lists:keyfind(Level, 2, LOG_LEVELS), </p> <p>replace it with a line like this:<br /> {value, {Int, Level, Desc}} = lists:keysearch(Level, 2, LOG_LEVELS),</p> Tue, 27 Sep 2011 08:53:34 +0000 mfoss comment 57871 at https://www.ejabberd.im Hi, I 'm trying to make a https://www.ejabberd.im/node/4499#comment-57863 <p>Hi, I 'm trying to make a module which mimic sending offline message push to prowl, code is here : <noindex><a href="http://www.unsleeping.com/2010/07/31/prowl-module-for-ejabberd/" title="http://www.unsleeping.com/2010/07/31/prowl-module-for-ejabberd/" rel="nofollow" >http://www.unsleeping.com/2010/07/31/prowl-module-for-ejabberd/</a></noindex> , I changed the original</p> <pre> "httpc:request(post...," to httpc:request(post, { "http://www.snee.com/xml/crud/posttest.cgi", [], "application/x-www-form-urlencoded", "fname=FIRST&amp;lname=LAST" }, [],[]) </pre><p> 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 :</p> <pre> =ERROR REPORT==== 2011-09-23 22:21:49 === E(&lt;0.2856.0&gt;: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,&lt;&lt;"s"&gt;&gt;}]}]}]} </pre><p> Could somebody shed me some light, why is it failed in module while it run well in bash :( ?</p> Fri, 23 Sep 2011 16:15:00 +0000 niha9088 comment 57863 at https://www.ejabberd.im Hi Henrik, I'm looking for an https://www.ejabberd.im/node/4499#comment-57290 <p>Hi Henrik,</p> <p>I'm looking for an expert to do a simple ejabberd customization project to do the following:</p> <p>* Additionally call a command line shell script when encountering an offline-message<br /> * Use MD5 Challenge for login authentication<br /> * 2 other minor customizations</p> <p>Would you be interested?</p> <p>Thanks,</p> <p>John.</p> Fri, 06 May 2011 09:42:34 +0000 johnw42 comment 57290 at https://www.ejabberd.im