I try to call setMyPushTriggerOption for ON/OFF user’s push options.
After calling setMyPushTriggerOption, it looks push_trigger_options updated well. The issue is channel’s myPushTriggerOption is not updated immediately
It updated immediately at isPublic:true group channel,
But not updated immediately if that group channel is isPublic:false.
The only figured difference is isPublic value.
Is there any differences or needed options to update myPushTriggerOption immediately? Or there’s something I could not checked?
Thank you for posting your question in the community.
Can you please elaborate more on ‘channel’s myPushTriggerOption is not updated immediately’?
Are you receiving push for the user after you set the push trigger option to ‘off’ or not getting any push notifications after you set it to ‘all’ or default?
Can you also please share the code where you are updating the push trigger options? It might be helpful in trying to reproduce this on our end.
And after set the options to “off”, user cannot received the notification (works well)
But after refetch the channel object using createMyGroupChannelListQuery() that channel’s myPushTriggerOption gives "default" value. Only if isPublic:true group channel.
Hope this answers are helpful for reporting.
Thanks
I tested this and I see what might be the issue here. You will have to fetch again the list of channels by running createMyGroupChannelListQueryafter you have set the push preferences for a user.
For example:
await handleValueChangePush(value)
await updateChannelList() // call createMyGroupChannelListQuery again inside here