processone/ejabberd — pull request #99 by bokner (2013-09-30 04:35:37+00:00)
Title: Mod shared roster patch

The work on patches was funded by Connectify (http://www.connectify.me).

The fixes are for:

1. https://github.com/processone/ejabberd/issues/81

2. There is currently no logic for updating displayed groups alone, the group updates only trigger roster pushes/presences if there is a change in group user list. Even then, the changes in displayed groups only affect the changed items in group user lists.

To reproduce the above issue:

* create a new user, user1@example.com
* create a new shared roster group called 'group1'
* add user1@example.com to the members of 'group1' group, but leave Displayed Groups empty for now
* log in user1@example.com with Pidgin/Adium/Psi
* create a new user, user2@example.com
* create a new shared roster group, also called 'group2'
* add user2@example.com to 'group2' group members, add user1@example.com to 'group2' group's Displayed Groups
* add user2@example.com to 'group1' group's Displayed Groups
* log in user2@example.com with Pidgin/Adium/Psi

user2@example.com is online, and sees the 'group1' group, with user1@example.com showing as offline. user1@example.com is online, and does NOT see the 'group2' group. Log out user1@example.com, and log back in, and user1@example.com sees the 'group2' group and user1@example.com and user2@example.com see each other as online.