'List all xmpp chat rooms with their subject names and last message
From the doc XEP-00300, I know I can list all rooms from for the user but is it possible to get filtered chat rooms by some metadata?
Scenario: As a user I want to open tab with 'apples' and I can see all chat rooms with some id=apple (some metadata)
As a user I want to switch the tab to banana and to see chat rooms with id=banana
Is it possible? Maybe other way? It has to be chat for many people.
Solution 1:[1]
Apparently that isn't explicitely possible. If you develop the client, there are somehow dirty alternatives:
A) Use the room name to set the tags.
For example, if the user wants to name the room "Last Marvel movies" with tags "film" and "comic", your client could create the room with name Last_Marvel_movies-film-comic.
Later, in the "search rooms by topic", your client gets the list of rooms, searches for -whatever
in any room name, and later removes -*
when showing the room names.
B) Use the room description to set the tags.
Each room can have a "description". You can set there whatever text you want.
The problem is: your client would need to get the list of rooms (as in case A), and then ask each room for its description, and then filter by topic.
All this is thinking in ejabberd. No idea if other servers with MUC service have another methods.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Badlop |