0
votes

I need lots of MUC chats with additional functionality:

  1. Change user's room manually from code

  2. Handle special "system" calls (for example calls like /changeroom must be not transported to everybody, but handeled by system)

  3. Store lots of additional data about user in mnesia table

  4. Store all history somewhere in db on hdd and return it on a request.

The only thing that comes to mind (about the second point) is catching every package handling package_fillter event. But that seems too heavy.

What could you advise?

1

1 Answers

0
votes

I confirm that your approach is overkill. Processing all the packets seems unnecessary.

You need to write a custom MUC module extension, if the feature of the MUC XMPP extension are not enough for you (XEP-0045).

Since ejabberd 15.07, a new hook API has been introduced called muc_filter_packet. It allows you to easily write an ejabberd module to extend only the MUC packet processing, without listening to all server wide packets.