My bot sends 2-3 messages at a time as apart of the conversation. This can get annoying when Slack beeps for every message. Is there a way to silence this. Facebook allows me to set a message type to silent to prevent beeps
No, there is not "silence flag" for messages in Slack. Here are your other options to prevent "beeps":
Mute channel
You can mute a channel so you wont get any notification for it. See this link for our to mute channel in your Slack client.
Notification settings
You can turn-off the "beeps" for every new message, but still get visual notifications about new messages. See this link for how to change notification settings.
Related
I am attempting to integrate PubNub iOS SDK in my project. How can I confirm that the published message was delivered?
Message Delivered Notification
If the publish callback status is success, then you know PubNub Network received it and sent it to all active subscribers.
If you want to be notified when a subscriber or each individual subscriber (if there are more than one) have received the message, then the subscriber(s) need to send (publish) a message back to the publisher.
But how many subscribers are receiving the message? Do you want to receive a message delivered notification for all subscribers? Just something to consider.
I'm building a simple slack bot and can currently send private messages as well as checking for the last 10 messages received within this one-to-one channel.
Is there a way of getting a POST notification to my webservice whenever the user replies, instead of having to poll and continuously check messages on that one-to-one channel?
Now you can make use of Slack events to receive notifications.
In the give use-case, 'Message' event can be used to capture message received and process accordingly.
https://api.slack.com/events/message
Bots generally work by connecting to the real-time messaging API, a WebSocket-based API that sends you events as they happen. Specifically, you should see a message event sent to you every time a message visible to your bot is sent.
To answer your question, there's no way to get an HTTP POST sent to you instead; you'll need to connect to the RTM API and listen for events that way.
Say i have an app with interactive notfications to be displayed on the Apple Watch. Lets say its a mail app for example, with a "reply with a thumb" button. When the user clicks that, it would be desirable to display some sort of result on the notification, for example "Mail was sent" or "Unable to send, server not found".
I can't find anything in the notification api to do this, which i find unfortunate. Just wanted to check if someone has the same usecase and if i have missed some (other) way to solve this.
You can have your app respond to the options in the notifications in the WKExtensionDelegate method handleActionWithIdentifier(_:forRemoteNotification:). This can perform a network request which can in turn send another push notification, or you can schedule a local notification as a result of the network request. Check out the UILocalNotification API
According to this post, the best practice is filtering channel messages on client side. I haven't found a feasible way to do that when push notification is integrated yet. Right now our iOS client gets notified for a lot of useless messages when app is not running.
Filtering PubNub Messages and Push Notifications
This is a shortcoming with APNS, not PubNub. PubNub works in such a way that all subscribers of a channel receive all messages published on that channel. But when an app is in the background on iOS or not running at all, your app does not have the opportunity to process the push notification before it is displayed by the iOS device. Android/GCM does allow your app to intercept the message before it is displayed.
Fortunately, there is only one scenario (that I can think of) where the sender of a msg would receive their push notification version of the message (meaning, you couldn’t intercept and not display it).
user publishes msg
then immediately (quickly) leaves the app (home button, switch to another app, etc)
push msg appears
But if the user stays in the app for a second or two (or long enough to receive the realtime msg AND the push notification), then you can prevent the push msg from being displayed. But there is no need to filter on UUID because you should be suppressing all push notifications from being displayed when the app is active in the didReceiveRemoteNotification delegate, because you already have the realtime message on the subscribe callback.
That link you referenced (Filter Owner Messages on PubNub Data Streams) is only for realtime push notifications and Stephen is calling out a feature that we will be rolling out in the near future which allows you to subscribe to a channel but provide a query that allows you to filter/query condition for the messages on the channel, like, “where uuid != ”, where is the uuid of the subscriber. Then the subscriber would not receive realtime or push notification messages because the server filters them out for you.
For a good overview of push notifications see Sending APNS and GCM Messages to Subscribers and Mobile Push Notification Services in One API Call
For complete push notification setup, configuration and implementation, see the docs for each of our SDKs.
Also, see my answer that describes how to use iOS silent push notifications to do on device filtering. Same thing can be done on Android but no need to do anything special because you always get the opportunity to process the push notification before it is displayed.
An user X(Has Whatsapp in Android) tries to send a message to user Y(Has Whatsapp) in iOS when the user Y is offline. The user Y receives a push notification that he has a message from user X. As soon as the push notification is received, user X is able to see the double tick mark in his WhatsApp client. How WhatsApp is able to figure out that the push notification has been successfully delivered to the iOS client ?
It's not really possible to know what's going on without seeing at least a protocol dump of WhatsApp as this occurs, so on with the rampant speculation:
I'd guess that WhatsApp is using Message Delivery Receipts, which rely on the client responding to the message, rather than the server. Since push notifications talk to an intermediate service (e.g., APNS), which itself wouldn't send said receipt acknowledgements, the client running on the device, upon receiving the push notification, wakes up, analyzes the message, and sends the delivery acknowledgement to the initiator of the dialog.
At least, that's how I'd do it, if I were trying to leverage existing standards, which isn't necessarily what WhatsApp is doing.
Whatsapp uses XMPP, which is TCP based. Thus, if the Server is able to get a connection to Y this should ensure that the message has been delivered.
So if the whatsapp server is able to send the message to Y, the message is pushed out of the server. If Y has enabled the extension to send message states, Y automatically sends a repsone to X with the extension "delivered".
I can't really know, but i would say Whatsapp keeps a service in background that detects it. If i am correct, when you close totally the app (from multitask), and receive a message, the other person won't see a received double tick if you don't open the app.