The PEP protocol gives each user access to their own virtual pubsub service, allowing them to share with their contacts any information they want. There are standard XMPP extensions for publishing your mood, activity, what music you are listening to, and more.
The only drawback until now has been that in chatrooms users and clients were unable to publish this information, and so resorted back to putting this information in their status messages.
Finding a solution to this has been on my todo list for a while, but this week I finally completed some proof-of-concept code for both the client and server side.
The below experimental code is to prove the protocol, and is not destined for release any time soon (both the client and server side will need some polish before that happens).
The technical bits
I chose to turn the MUC’s bare JID into a virtual pubsub service for each occupant. Events are published from the respective occupant’s room JID, as a message of type ‘groupchat’ (in my experience using the type eased the client implementation).
While experimenting I discovered that currently released versions of Gajim throw a traceback when they receive a PEP update from a MUC occupant. This suggests that we will (sadly) need a way for clients to indicate that they support PEP in MUC, and want to receive updates, to avoid breaking Gajim and other existing clients which might not like the new behaviour.
The next thing I’d like to do is get feedback from other developers, and ultimately a XEP published. Then we can refine things further, and finally get this implemented across all clients and servers.
Personally right now I’m off to write a Prosody filter plugin to convert annoying “Now Playing” status messages into PEP updates :-)