Tareq Assi
Tareq Assi

Reputation: 157

How can the recipient be informed that someone has blocked them on ejabberd?

We are building a chat app using latest ejabberd and there is a use case where user A blocks user B. the requirement is to hide last seen or user's presence from each other. if A blocks B then its easy to hide these information from user A but how can user B be informed that user A has blocked them ? whats the best approach to tell user B the someone has blocked them on realtime while both are in a conversation , like whatsapp does now.

Upvotes: 0

Views: 126

Answers (2)

Kenan Begić
Kenan Begić

Reputation: 1228

There is XEP-0191: Simple Communications Blocking:

https://xmpp.org/extensions/xep-0191.html

https://xmpp.org/extensions/attic/xep-0191-0.2.html

I think it will give you the answers you need. Now it depends how will you implement this functionality using chosen client library like Smack.

Upvotes: 0

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

For presence, you do not have to use block, you can simply remove contacts from roster. That way, the other user is notified and can also stop sharing his presence.

Upvotes: 0

Related Questions