[ejabberd] Affecting a roster push
rduke496 at gmail.com
Thu Nov 27 18:17:31 MSK 2014
I am using the latest ejabberd with mod_shared_roster with
auth_method, mod_shared_roster and mod_vcard all using odbc.
Additionally I am using a database View to expose the data in my
proprietary tables in the way that ejabberd expects it (sr_user,
My problem is that when I (for example) change the users nickname in
the vcard I need a way to affect a roster push to all users who
currently can see the only alias on their screen (actively connected).
I have been doing this for add/remove entries using a 'hack' involving
the srg_user_add and srg_user_del operations from mod_admin_extra.
Since the SQL view is read only those operations do not cause a write
but that's ok - I am happy they have the desired affect (i.e. the
relevant roster item is removed or added from connected users).
However, when it comes to something like a nickname change I thought I
could do something like a srg_user_del followed by a srg_user_add but
that does not seem to go back and re-read the fresh vcard data from
the database. So all it results in is the old alias disappearing and
My question is: is there any better way to do all this? I'm imagining
a command like "re-read users details and push to any impacted
rosters". I was going to have a go at writing one but it seems like
someone else must have had this use-case before.
Are there any known plugins or any starting point people can point me at?
More information about the ejabberd