I have an interesting use case, which poses some problems I am not sure how to solve. I imagine this has to have been a problem for someone in the past, but I cannot find any info on it.
I have an iOS app which has federated users at my company. There is a back end admin web site which controls content distributed to the users based on the AD group they are in. An admin can assign one or many AD groups to a document.
I want to send push notifications to users when a document has been published to an AD group they are a member of, but I dont want to send them duplicate notifications. I am registering tags in the iOS app as AD groups. For example, say a user Jane is a member of the following:
[[UAirship push] addTag:@"AD_Group_A"];
[[UAirship push] addTag:@"AD_Group_B"];
Imagine the member assignment is as follows:
If a new document is created for groupA, John and Jane will get the notification: "A new document named DocX is available"
All is fine up to this point, but now what if an admin adds AD_Group_B to DocX. So now AD_Group_A and AD_Group_B are assigned to DocX. The admin code will notice AD_Group_B is a new group and send a push notification to tag: AD_Group_B. Now Jane and Jim will get notified.
The problem is that Jane was already notified before.
Is there a way to ID each notification and conditionally show a notification by running code to check whether the user already received it? Or other solution?