User didn't receive any notification? (Deepstream.io) - events

When sending notifications in DeepstreamIO, if a user is offline and later reconnects, he will not see the notification. In addition to that records is empty. Can you please suggest any solution?
I try to send notifications to many users, I found that if I send for example 3 notifs the user received the last one, but if he is offline and the reconnect, he can't notify.

Related

Receive notification when user cancels MS Store subscription?

I'm currently research if there any way to get notify our server when subscription status had change (expired or cancelled manually). I had read two related articles:
https://learn.microsoft.com/en-us/windows/uwp/monetize/change-the-billing-state-of-a-subscription-for-a-user
https://learn.microsoft.com/en-us/windows/uwp/monetize/enable-subscription-add-ons-for-your-app
For now the only way I see, is to check status on purchase validation via Azure, which happens on login in my case (which is not notification obviously), disadvantages of this approach that there would be a ton of notification from each user who logon, even if there no any changes in subscription.
Another possible options (I guess) is to send notification using WNS or Azure, according to articles:
https://learn.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/windows-push-notification-services--wns--overview
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-windows-store-dotnet-get-started-wns-push-notification
I see it's possible to send direct notifications to cloud service, but I can't find any information on how to subscribe to user subscription changes, is it even possible?

Unable to get timestamp of the message posted by Slack App

Whenever my app posts ephemeral message to Slack channel (in response to a query by a user), I am unable to get the timestamp of my Slack app response. As I want to delete it once the user has made a selection using one of the buttons. Although I have subscribed to 'message.channels' event, I don't get a notification to my app whenever my app posts in the channel (in response to the user input), therefore, I am unable to get the timestamp of the message which I'll use to delete it. All I want is the timestamp of the message posted by my app so that I can delete it but I am unable to receive the timestamp. Please help!
For e.g. in Giphy app for Slack. Let's say the user invokes the app by calling '/giphy [dog]' where 'dog' is just an example of a search term. The app responds by sending a gif and user can either send it, shuffle to the next one or cancel it. I want a similar capability of cancelling the app response but I need the timestamp of the message in order to do so therefore I am asking for help.
Thanks.
Your approach can not work, because Slack is handling ephemeral messages differently from "normal" messages. They are only visible by one user and can not be modified by API methods (e.g. deletion).
But of course its possible to replace ephemeral messages. Here is how:
Your app can just reply to the interactive message request from Slack with a new message. That new message will by default override the original message including ephemeral messages.
You can reply in two ways:
Directly reply to the request from Slack with a message within 3 seconds
Send a message to the response_url from the Slack request within 30 minutes.
See here for the official documentation on how to respond to interactive messages.
This approach works both with interactive messages and slash commands.
See also this answer for a similar situation.

Slack - confirm before send

Is there a way, by means of some setting or programmatically, to allow a user on Slack to confirm that the user really wants to send a message before the message is sent? Often times we end up sending messages on the wrong channels or DMs. How can we prevent these?
Assuming by "send a message" you mean "post a message" to a channel.
Via Settings
No. There is no Slack setting to enable confirmation before a message is posting.
Programmatically
No. Its possible to retrieve all messages that are posted to a channel with a Slack app (e.g. via Events API) and then react to them, but only after the fact. To the best of my knowledge it is not possible to insert some kind of confirmation logic into the standard process of posting a message.

Advanced notification system (notify only about unread messages)

I'm building an application based on Laravel 5.6 with live chat functionality (uses Pushier).
I need to notify Users via email about new messages. The problem is that I should not send notification each time as message sent because user can be online and receive this message. Also if theme were 20 messages in a minute I do not need to send 20 emails, just one with "you have new messages".
My idea is:
1. on each message I have a Laravel Notification "Message received". If user online - notification deletes. So in notifications table I have notifications about unreceived messages.
2. I should run Task (e.g. each 15 min) and if there Notification(s) for User - sent email "You have unread messages".
3. Now I have the problem that if user won't read notifications during 15 min - he will receive email again.. So I need to store in some table (or expand current notification table with mark) data about Notifications that already was emailed.
Is my approach correct?
Thanks!

How do I receive only the messages that are direct messages to my bot user?

I have successfully setup my slack bot app, have enabled events etc. I want to receive any direct messages that the members of my slack team send to my bot. For this, I have only enabled Bot Events and No Team Events like below
However, I do not get any event on my webhook on this setting.
If I enable message.im event under Team Events, then I start getting events. But then, I get every message that the user (who has installed the app) sends to any other user in the team.
How do I get only the messages that are sent to my bot user?
Update 1
Based on this SO question I created a private channel with the bot user. Even then, the messages in the private channel do not arrive in my webhook with the above event subscriptions.
Update 2
After reinstalling the app, it seems to be working fine. I have only used it for few minutes after the reinstall so far. I will keep posting here how it goes. It would still be interesting to know what went wrong where.
It is normal behavior that your script receives all messages (for every channel your bot is a member of), not only the messages sent directly to your bot. At this time you can not filter further in the event configuration. So you need to filter out any unwanted message in your script handling the event.
See also this answer.

Resources