[2.0.5] changing of username with shared roster makes the user appear offline

I configured a shared roster with app. 10 members. This worked pretty fine.

If I change the name (in the shared roster) of one of my chat buddies, I immediately appear off-line to him. After reconnecting everything is back to normal. The name got changed.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Same problem, try patch

I tried with ejabberd 2.0.5 and Tkabber SVN. I get your same problem, and ejabberd reports this error:

=ERROR REPORT==== 16-Nov-2009::17:20:55 ===
E(<0.592.0>:ejabberd_hooks:205) : {undef,  
                                   [{mod_roster,item_to_xml,
                                     [{roster,              
                                       {"badlop44","localhost",
                                        {"badlop","localhost",[]}},
                                       {"badlop44","localhost"},   
                                       {"badlop","localhost",[]},  
                                       "Bad LOP",both,none,        
                                       ["aaaaa"],                  
                                       [],[]}]},                   
                                    {mod_shared_roster,set_item,4},
                                    {mod_shared_roster,set_new_rosteritems,7},
                                    {ejabberd_hooks,run_fold1,4},             
                                    {mod_roster,'-process_item_set/3-fun-0-', 
                                     6},                                      
                                    {mnesia_tm,apply_fun,3},                  
                                    {mnesia_tm,execute_transaction,5},        
                                    {mod_roster,process_item_set,3}]}         
running hook: {roster_process_item,["localhost"]}    

I applied this simple patch:

--- a/src/mod_shared_roster.erl
+++ b/src/mod_shared_roster.erl
@@ -264,7 +264,7 @@ set_item(User, Server, Resource, Item) ->
                id = "push" ++ randoms:get_string(),
                sub_el = [{xmlelement, "query",
                           [{"xmlns", ?NS_ROSTER}],
-                          [mod_roster:item_to_xml(Item)]}]},
+                          [item_to_xml(Item)]}]},
     ejabberd_router:route(
       jlib:make_jid(User, Server, Resource),
       jlib:make_jid("", Server, ""),

With that, the problem is solved in ejabberd 2.0.5.

I also tried in ejabberd 2.1.0 and the problem doesn't appear in that version.

Syndicate content