Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactions in MUC room should target message via StanzaId #60

Closed
nesium opened this issue Feb 28, 2024 · 0 comments
Closed

Reactions in MUC room should target message via StanzaId #60

nesium opened this issue Feb 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nesium
Copy link
Contributor

nesium commented Feb 28, 2024

Sent or received reactions in MUC rooms are not displayed when having a chat with a user using e.g. Movim.

The reason is that we're targeting messages for reactions via their id while in MUC rooms they should be targeted via their stanza id:

When a user chooses to react to a message with a certain emoji, the client sends a stanza containing a element. The chosen emoji is included in a element within the element. The message is referred to by including its id or in MUCs its stanza-id as defined in Unique and Stable Stanza IDs (XEP-0359) [6] in the 'id' attribute of the reactions element.

See: https://xmpp.org/extensions/xep-0444.html#sending-reactions

This detail should be hidden from the core-client users. Which means that the core needs to translate ids into stanza ids when sending a reaction, while translating stanza ids into ids when receiving a reaction and dispatching an event.

Furthermore not only Room needs to take the room type into account when sending a reaction, Message::reducing_messages needs to take this into account as well while the MessagesRepository needs to fetch messages not only targeted by their id but also by their stanza id.

@nesium nesium added the bug Something isn't working label Feb 28, 2024
@nesium nesium closed this as completed in b73e7fd Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant