Comments (19)
You can't any more.
from ejabberd.
So you don't want to see roles but what affiliations are stored in a room (roles are only set for online users). Check https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#get-room-affiliations
from ejabberd.
Then you should send something like this: https://xmpp.org/extensions/xep-0313.html#filter-time (ideally example 8 from that), with time from last message that you seen, and you should receive messages that were archived after that one.
from ejabberd.
This column got repurposed, and now it keeps info about date of room hibernation (or sentinel value of 1970 when room is alive).
from ejabberd.
So what you see here is correct behaviour per current code.
from ejabberd.
In case I want to know when this room was created, where can I get it? @prefiks
from ejabberd.
By the way, can you tell me? Can I get a list of members in the room with their roles via admin api ?
from ejabberd.
You probably could use ejabberdctl get_room_occupants room conference.server.com
. It require mod_muc_admin module enabled in config. Docs here: https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#get-room-occupants
from ejabberd.
yes, i got it. But i get nothing when user disconnect.
from ejabberd.
Yeah, thanks so much. I also get another issue. Please help me. When i join a room or send a message, it's created many chat records in archive for all users in room like the image below. kind = chat and txt is empty. Please see last 4 records. this room have 3 members. i connect with user 1 (owner) and user 2, user 3 are members.
Please....
from ejabberd.
What those messages contain? Could you expand xml of one of those?
They look like messages to individual room member (and not sent to all members of a room), and as such are stored in sender and recipient archive.
from ejabberd.
It's full description in xml. this room have 3 members.
from ejabberd.
This message have type "chat" so it's handled like regular message between two peers (as it in fact is), so it get stored in recipient and sender archive. What do you expect to happen with those message, they never get stored?
from ejabberd.
But obviously I sent it to the room as a groupchat kind. and i understand everybody in this room will received it. I think it needs content saved in txt and kind is groupchat.
Suppose I want to get the chat history of user3 in room2 from the last message at (timestamp). How can i do it?
from ejabberd.
Ah, those are mucsub events that are generated for muc messages. This is how mucsub works, it notifies subscribers that aren't in room, by sending those. And those message are allowed to be stored in archive or offline storage, because this is only way that offline user can know about those.
from ejabberd.
thanks @prefiks. Let's me clarify something
- Multi User Chat in XMPP is presence based. When you are online you get the message. When you get offline, you leave the room and will not get anymore message until you join the room again by sending a presence message. The only way that offline user can receive message is use MUC/Sub protocol to subscribe to chat rooms. And those message are allowed to be stored in archive or offline storage like a message between two peers.
- To get history of user from the last message at (timestamp) in MUC/Sub i have to parse the xml column, right? in case, taking full control of the message management on the client side.
from ejabberd.
Generally you don't need to parse anything, as there is already code in ejabberd that handles all this in mod_mam module, that respond to request described in https://xmpp.org/extensions/xep-0313.html.
Are you trying add external management of those outside ejabberd?
from ejabberd.
I'm talking with ejabberd by golang. and clients (Web/App) connect with Chat Service (golang) and use go xmpp library https://pkg.go.dev/github.com/xmppo/go-xmpp
from ejabberd.
Thanks @prefiks, let's me try.
from ejabberd.
Related Issues (20)
- Dependency conflicts when using Timex with Ejabberd HOT 2
- Update mod_muc_room to support XEP-0425 0.3.0 (VERY EARLY DRAFT) HOT 1
- erts_vsn inside ejabberdctl never gets set HOT 3
- SASL2: Stable resource is used if no user-agent id is set. HOT 8
- Error While call /api/get_user_subscriptions at localhost HOT 3
- Return type of get_vcard API call changed (and is different from docs) HOT 2
- ejabberd do not start after update from 23.10 to 24.02 HOT 5
- Store data into nick column on archive table.
- Date and reason for banned accounts not stored when using SCRAM HOT 6
- Stream closed by local host: has been kicked (policy-violation) HOT 2
- Mucsub subscription messages are not receiving when create a new group in a other xmpp connection. HOT 23
- [Question] Custom Module deps HOT 8
- mod_block_strangers: Allow messages from joined MIX channels HOT 1
- "Internal error of module mod_mam has occurred during start" related to origin_id HOT 9
- Error after disabling and enabling back mod_fail2ban HOT 2
- Rebar3 downloads all dependencies in rebar.lock, even the disabled ones
- jose_server.erl - syntax error before: 'catch', function handle_call/3 undefined HOT 4
- How to get the client IP for authentication purposes in an external auth script? HOT 4
- mod_block_strangers catpcha option not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ejabberd.