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

Ignoring users working not properly #3719

Open
Blager89 opened this issue Sep 11, 2023 · 1 comment
Open

Ignoring users working not properly #3719

Blager89 opened this issue Sep 11, 2023 · 1 comment

Comments

@Blager89
Copy link

Hello, I'm trying to implement an ignore function and ran into a bit of a problem

how to reproduce:
User A starts ignoring User B
User B sends several messages to User A
User A does not receive any messages from User B
then user A will unignore user B
User A received several messages sent by User B while User B was being ignored

sometimes I can get the last message, sometimes all messages, It depends on how quickly I unignore after the ignored user has sent a message

matrix js sdk version: "matrix-js-sdk": "^28.0.0"
Also attached 2 screens made in Element app
1
2

expected result: According to the documentation, the user should not receive any messages sent by him while ignoring the user

any thoughts on how to fix this?

@bloor
Copy link

bloor commented Nov 22, 2023

I have same issue, however my theory is that's the way intended for "ignore" as stipulated by documentation:
After ignoring a user, the said user can still send messages to the Room. But you no longer get /sync events for those messages.

The messages are already in the room, they were always there. The server simply does not send them to you.
HOWEVER. After unignoring the user .. if you refresh page you will get/read ALL THOSE MESSAGES (none should be skipped).

What you need to do is a manual filtering. You need to make another "accountData" storage in which to store the ignore-unignore intervals/timestamps between those 2 users. Then filter the messages that fall in any of those interval so they are not shown on the chat, EVEN THOUGH they are sent by the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants