What does "group_close" mean in Slack's Event Webhooks? - slack-api

When using the Events Webhook API, there is an event called group_close (also has im_close for im conversations). What does this mean? ie: what does it take on the Slack client to get this event to trigger? Slack's documentation on this is pretty minimal:
The group_close event is sent to all connections for a user when a private channel is closed by that user.
source: https://api.slack.com/events/group_close
I tried /close command and it just archives the group/im conversation. Is this an outdated event that is no longer relevant? I know it still gets called, but as far as I can tell, it's identical to archive.

The group_close events refers to a multi-person DM (this should be corrected in the documentation). You can close an MPDM and trigger the event by clicking the x next to the conversation on side bar or running the /close slash command like you did. This doesn't actually archive the channel just removes it from your sidebar. You should be able to re-open it.

Related

Displaying popup messages/modals with Microsoft Graph

I am currently developing an Outlook Add-In that receives a notification whenever a change in the user's calendar is recorded. The thing is that, there are some occasions where we would change an event's date from the backend by calling PATCH /events/eventId.
It would be very nice if there was any way to notify the user immediately, other than sending an email. Something like a popup modal with a warning message would work very well.
Currently the feature you requested is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process.

Make slack event message.im work only with bot mention

I'm working on slack bot that will generate some creds for users, so it must be asked and reply in direct messages only.
It works with message.im Slack event, but event is triggered twice - when user asks bot AND when bot replies:
I have a trap for second event in my code:
if "subtype" in SLACK_EVENT["event"]:
print('Ignore bot event..')
exit(0)
..but I'd like to get rid of that.
Can I somehow combine (add AND condition) message.im with app_mention?
So user will send IM to bot and only of bot was mentioned event will raise?
That is not possible. If you are only interested to a subset of message.im events you need to filter them out in your code as you suggested.

Telegram bug on iOS bot sending multiple times same message

I think I've found a Telegram bug on the iOS app that causes the bot to send multiple times the same message. The steps to reproduce the problem are:
click on an inline button, type callback
immediately lock the phone screen, before the bot answers
wait a few moments and then unlock the screen
It will be noticed at this point that the bot starts sending the same message numerous times. It is not easy to reproduce, it is important to lock the screen when the bot has not yet answered, so it is easier with bots that take a few moments to respond. Also, in the answer the bot has to send a message (not editing one that already exist).
I use Microsoft Bot Framework to develop the bot, however all the bots give me the same problem, both mine and others developed with other technologies different from mine. For example, I was able to reproduce it on #BotFather too. Sometimes it enters in a loop, and to stop it you have to send any message to the bot.
I use an iPhone 5, iOS version 12.1.2, Telegram version 5.2. I also tried it on an iPhone 8, but not with other versions of Telegram.
I also happen to receive more than 20 identical messages.
I've already contacted Bot Support on Telegram but no one answers me. Is there anyone who experienced the same problem?
On iOS and macOS, when I click on an inline button and switch the client computer (macbook) off (sleep mode) and turn it on my bot receives the last message sent by the user. Each time message_id is the same.
I solve it the following way: when my script sends a request to the Telegram server it receives a response. That response contains a message_id field and I save it.
Any next message must have another message_id. I just compare that number with the stored number and only if the number is other than saved I run the rest part of my script.
You can try my test bot and watch results in google table.
#ios_bug_bot (https://t.me/ios_bug_bot)
https://docs.google.com/spreadsheets/d/1VTx-O1w_-ka1RzGfaVLVBDu0CQxk16QeJTeFYOE4yvo/edit?usp=sharing
The bot source code is here
https://github.com/avtomatron/telegram_bot/blob/master/google_script_bot

Slack post by bot not always containing

I'm using the "incoming webhooks" feature of Slack to post notifications to a channel. I'm also using the "icon_emoji" feature to decorate the messages and to highlight the different types of messages. However I find that the image doesn't show up consistently:
Ie. only when it says BOT does the image also show up.
Any ideas what the issue is? Ideally I would like for the image to show up each message so that they can be scanned easily (some messages are more informative and others need to be acted upon in a timely manner).
Slack is automatically consolidating consecutive messages that are sent within a certain time frame. So the bot icon will show for the first message only and consecutive messages will display beneath the first without the bot icon.
This is standard behavior of Slack and works the same for user messages. Don't believe there is any way to turn that off.

Having a user click a link in a Slack Incoming Webhook Message and getting their response

I'm looking to have a user type something like
/makemeeting today # 4:00pm
this fires a outgoing webhook, which stores the info, then it fires a incoming webhook which would display a message in a channel saying meeting scheduled, and have two links
yes | no
Here's where I'm stuck. I can do everything up till this point. I'd love for any user to be able to click on one of those links and have it perform another outgoing webhook with the proper response.
I know I can just make those links point to a website, but I'd love to keep it all within slack without having to open a browser.
Is this possible? I swear I've seen yes|no, true|false replies before in other commands and bots, but I might be imagining that.
Any help would be appreciated...
thanks
This isn't supported yet but is on Slack's roadmap for the "near term".
https://trello.com/c/DVrJLbxX/12-interactive-messages
A work around is to add reactions to your message. When the user clicks the reaction (to bump up its count), an RTM event will be dispatched for you to handle: https://api.slack.com/events/reaction_added
An live example can be seen with the Meekan calendar app: https://meekan.com/slack/
So you could have two reactions: thumbs up and a thumbs down. And handle which reaction the user clicked.

Resources