I have a Role Type that multiple users are subscribed to recordCreation changes for.
It's easy to add new users to this CKQuerySubscription by using its subscriptionID, however the issue arises when I try to 'unsubscribe' one of the users from the subscription using the CKContainer.default().publicCloudDatabase.delete(withSubscriptionID:) method.
Rather than just stopping this device from receiving any further notifications, it deletes the subscription (for all other users as well).
So my question is: how do I remove one user from a CKQuerySubscription without deleting the subscription for other users who are also subscribed to it?
Related
I'm creating some local notifications for my users to remain them different events. I achieved this by using https://pub.dev/packages/flutter_local_notifications. These notifications are scheduled and can be removed easily.
I was thinking in other hand to move this to the private calendar wit Gmail. I have done this in the past and I know how to create them but I was wondering if I could remove also them.
In my app I have different portfolios. These contain rents and each rent has leases. When the user creates a lease an event is created with the different payment days.
If the user deletes either the event, the lease, the rent or the portfolio, I need to remove automatically all the notifications. Right now, since this is created with local_notifications I can do it, but would it be possible by having the events created in Gmail?
Could I created/remove a bunch of events without displaying the Gmail calendar app?
I am developing a mobile messaging app (ios) and I support the logout feature. I want to keep the latest conversation list when the users logs in back again. Because the local storage of the app gets cleaned once logout.
I am using MAM XEP-0313 sucessfully but I have not found an IQ to query the conversation list of a particular user.
For example:
chat
user_a -> user_b
user_c
user_d
user_f
user_a has had conversations with 4 users and he wants to logout of the app, when he comes back in he needs to get those last 4 conversation threads on his list.
What I do when a user messages another user is that I add them to my roster and have the logic of automatic subscription. So I was thinking to use the roster history logic to query this collection but I was also expecting the MAM module to have a more direct way..
I am using MongooseIM server
I understand your problem, the solution you have is probably the best one you can have with standard XEPs and their implementations.
The conversation list is actually sth missing in MAM spec or in general in XMPP. There are some works to define an extension to get you all the conversations where you have some unread messages (so called "unread sync"). Will this be enough for you or you would rather want to get some kind of "inbox". By "inbox" I mean a list of all recent conversations with unread messages count where there are some unread messages.
I am new to XMPP and working on a group chat application similar to watsapp. The scenario is:
"User A creates a group chat adding users B, C and D to it. All members are online and they are chatting. Now D takes the app to background or kills the app. Now A removes D from the group. How user D will be notified that A has removed him from the group, when D comes back to the app ?
I am using ejabberd (15.11) with PostgreSQL and following the XMPP architecture. I am not sure if the answer is out there, so would like to get help here.
XMPP MUC specifications says in section 9.5: Modifying the Member List:
If a removed member is currently in a members-only room, the service
SHOULD kick the occupant by changing the removed member's role to
"none" and send appropriate presence to the removed member as
previously described. The service MUST subsequently refuse entry to
the user.
It means that the participant will only receive his own status change modification if it is present it the room when the event happen. If he is not online at that time, he can only know his credentials has been removed, because he cannot join the room anymore. In other words, in the current state of the specifications, there is no way to get that removal notification when user was not in the room when the removal happened. You can just infer he was removed because he cannot join the room again on next login.
There is nothing else defined in XEP-0045 Multi-User Chat to store membership event for offline participant and later delivery.
In a webapp (ASP MVC), I have a view/page that lists new notifications/incoming messages similar to a list box (picture a mail box, but much simpler) across sessions for users. I understand INotifyPropertyChange and Observables
My scenario: I have a simple Transactions table with a TransactionType, only some transactions with Transaction.Transactype == Approve/Reject need notifications.
How do I model this in the database and the object so that I can pick up these changes, everytime the user logs back in, across session?
Here is what I did,
I created a separate Transaction.ApproveTable and I attached a trigger on insert, but I am looking them across the sessions
I created an MSMQ journal, but its blocking since its serial from notifying other users. I also have a role notification scenario, where I notify all member of the role.
I am working on the chat application.
I want to implement the group user chat and I have successfully done that.
Now I want toad the functionality by which user can leave the group. I found leave the group but it seems like it's just making user unavailable but not removing user from the member list.
Is there any way by which user remove himself from the member list?
I have read the xep 0045 for it, in that there is a topic for existing the room which seems make user unavailable but not removing from member list.
http://xmpp.org/extensions/xep-0045.html#exit
If anyone has any idea how to do this please share it.
Leaving a room in XMPP (0045) is accomplished by sending an unavailable presence to that room (see XMPPRoom.leaveRoom() in the XMPPFramework) - that should remove them from the occupants of that room (we do this with our app regularly).
"Members list" - is a MUC feature for moderator use cases, it is not related to user. Just leave room as described in XEP, you no need to modify members list. In fact, you no need to add user in this list too, simple chat application should only tracks <presence> stanzas from and to room JID.