Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Blocked users should not be received notification using mod_apns.erl in ejabberd #25

Open
nileshbacancy opened this issue Sep 13, 2018 · 4 comments

Comments

@nileshbacancy
Copy link

nileshbacancy commented Sep 13, 2018

Hello @mrDoctorWho @zinid
I am using ejabberd 16.09 version, for notification use mod_apns.erl file to the mod_apns module.

I am receiving offline message using this module and also for getting notification from blocked users message. i.e. UserA and UserB online. UserA has blocked to UserB. UserA can't send a message but when UserB sends message UserA getting that sent message in the notification.

So, Can you please help me out for how to prevent the notification from blocked users?

@mrDoctorWho
Copy link
Owner

Hi @nileshbacancy

What type of blocking your users use?

@nileshbacancy
Copy link
Author

Hello @mrDoctorWho
let me take one example: UserA open chat app and he has UserB in chat contact list.
UserA has a block to UserB (Block contact feature).
When UserB sends any message at that time UserA received that message notification.
I have used mod_apns.erl file for sending notification in IOS.

@mrDoctorWho
Copy link
Owner

@nileshbacancy There are few ways to block a user.

  1. The user can be blocked via XEP-0016: Privacy Lists
  2. The user can be blocked via XEP-0191: Blocking Comamnd
  3. The user can be blocked internally, by the client (library)

Too find out what check I should perform before sending a PUSH, I need to know what type of blocking you use.

@nileshbacancy
Copy link
Author

nileshbacancy commented Sep 14, 2018

Hello @mrDoctorWho

We are using 2. point to blocking command in IOS.
2. The user can be blocked via XEP-0191: Blocking Command

I just want to prevent PUSH notification while Blocked user sends any message to that user which has blocked to him.
Please read my previous comment example.

Can you please tell me which script run in mod_apns.erl for sending a PUSH in IOS?

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

No branches or pull requests

2 participants