Open Slack thread pane via API - slack-api

Every unthreaded message in Slack has a button to "Reply in thread" which opens the thread pane when the message itself isn't yet a thread. Can this same behavior be accomplished with the Slack API? The only route I can see is to post a threaded message then navigate to that message via permalink which would be pretty clunky.

Related

How can I make it look like a bot is typing in slack?

My slack bot has a slight built-in delay (1.2 seconds) in its responses, but I'd like the user to know that it is intending to respond. When a user is typing, a "user is typing..." indicator shows on the screen. I'd like to trigger that indicator for my slack bot. How can I do this?
There is no way to do this through the slack api at this time.
One option would be to send a message that just said "..." and then 1.2 seconds later replace that message with the full message.

How to send message in a thread using microsoft graph API?

I'm building a tool in which I need to send more than 2 messages in the same thread (the message have identical subject & recipients) using Microsoft Graph API with some interval of days between them.
The problem is that I cannot send a message in the same thread using the API, even though the subject & recipients are same, Outlook displays them as different threads (but on the recipients' side (Gmail side) - they belong to same thread).
I tried using conversationId (which I got in the first message) in the second message but they still ended up showing in different threads.
Is there any way in I can send messages in the same thread?
According to your description, I assume you want to use the https://graph.microsoft.com/v1.0/groups/{id}/threads endpoint to send more than 2 messages in the same thread.
Refer to this document,
A new conversation, conversation thread, and post are created in the group. Use reply thread or reply post to further post to that thread.
So we can use the replay endpoint to send message in the same thread.
To send emails in one thread you should use createReply method where you provide messageId of a previously sent message.
The tricky part is that after you sent a message with send or sendMail API methods, you do not have access to messageId. Even if you create a message via create method, messageId will be different after sending it.
So the solution is to send the message and find it in 'Sent Items' folder to retreive messageId. I am doing this based on time, subject and receiver. There is also useful param $top.
With correct messageId you'll be able to create reply and send it in the same thread.

Docusign API - Recipient and Sender View Timeout

I am using both the REST API and the .NET library to work with Docusign from our site. I was just checking if there were any properties anywhere inside the envelope that let you know if a sender or recipient has the envelope "open" (aka the signing or tagging view URL was loaded, but the user hasn't finished).
Within our web app, we can easily tell when they've "opened" it because when users sign or place tags, they click on one of our own internal links first before being redirected, but unless the user finished the process (either clicking SEND or FINISH or just plain TIMING OUT and getting redirected back to our page), we can't tell is the user currently is looking at the document or if they opened it and then closed it.
So basically, I guess I'm asking if the user closes their browser without sending or signing, is there some kind of date or flag that can tell this?
One follow-up question: Speaking of Timeout, I set ours to 15 minutes. Once you open the console URL to place signature tags or to sign, does the timeout start and then ONLY stop once you've SENT or FINISHED the envelope? Do other actions like scrolling, partially signing, etc reset the timer? Or is it X minutes after the console is open, no matter what?
Sorry, no, the sender view does not offer a ping facility.
In the usual use case, the sender is motivated to send out the envelope for signing. So the problem of the user "abandoning" the sender view is generally not a concern.
You can check the envelope's status periodically or register for a webhook message when the envelope is sent. The envelope will be sent when the sender successfully finishes using the sender view.
If the sender is a concern, I suggest that you not use the sender view. Instead, get the necessary information (docs, recipients, notes, etc) from the sender, then send the envelope programmatically. Use "the Send on Behalf of" (SOBO) feature to send the envelope for the sender.

Ignore events generated from method invocations

I have the following case:
1) A user sends a direct message to my bot (which has been installed with the Slack app).
2) The message generates an event which is sent to a webhook on my server. The message gets processed, and a response is sent to the user (via the chat.postMessage api (https://api.slack.com/methods/chat.postMessage)).
3) Now, another event is generated (with type "message", and subtype "bot_message") and sent to my webhook.
Is it possible when sending a message (with the chat.postMessage method) to make Slack not generate a corresponding event? (Since I'm the one sending the message, it is completely unnecessary for me to receive an event telling me that I have indeed sent a message.)
No, I don't think it is possible. You can not subscribe to specific message sub_types.
I had the same issue when using the message events and I just told my bot to ignore all messages that have a sub_type.

wcf execute function at background

I develop a wcf function(e.g. bulk SMS to all db users) when raised took long time.
is there any way in wcf so that respond to admin "ok we will process your request " and sms process will execute seperatly.
My Recommendation is to separate this task on to two tasks "Prepare Messages" and "Send Messages"
Prepare message: prepare list of messages that will be sent to the users
Send Messages: loop over created messages and send them
You can use some message queuing frameworks or you can make small table to act as your queue so when the user click the button, Start background thread or task to loop over db users and insert them into the messages table, then create scheduled task to loop over the messages table and send them
This approach will give you more control as you know the messages that will be sent and the status of each message also you can add retry counts to your table

Resources