Coder Social home page Coder Social logo

Comments (19)

prefiks avatar prefiks commented on May 19, 2024 1

You can't any more.

from ejabberd.

prefiks avatar prefiks commented on May 19, 2024 1

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.

prefiks avatar prefiks commented on May 19, 2024 1

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.

prefiks avatar prefiks commented on May 19, 2024

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.

prefiks avatar prefiks commented on May 19, 2024

So what you see here is correct behaviour per current code.

from ejabberd.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

In case I want to know when this room was created, where can I get it? @prefiks

from ejabberd.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

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.

prefiks avatar prefiks commented on May 19, 2024

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.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

yes, i got it. But i get nothing when user disconnect.

from ejabberd.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

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.

image

Please....

from ejabberd.

prefiks avatar prefiks commented on May 19, 2024

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.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

It's full description in xml. this room have 3 members.

Screenshot 2024-04-16 at 17 43 51

from ejabberd.

prefiks avatar prefiks commented on May 19, 2024

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.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

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.

prefiks avatar prefiks commented on May 19, 2024

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.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

thanks @prefiks. Let's me clarify something

  1. 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.
  2. 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.

prefiks avatar prefiks commented on May 19, 2024

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.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

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.

vietnguyen87 avatar vietnguyen87 commented on May 19, 2024

Thanks @prefiks, let's me try.

from ejabberd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.