Activity after deep linking a chat in teams - .net-core

I have a .Net Core application from where I have deep linked a particular chatbot of Microsoft Teams. It is an Azure Bot. It is properly opening the chat in Teams, which is a one-time process. However, as soon as the chat opens I want to catch a bot activity, which I'm unable to do. I want to send a welcome message as soon as the chat opens.
Please suggest which activity I can catch after deep linking or what other approaches I can take to achieve it.

You want to listen for the conversationUpdate event in your bot code. You can read more about it here. Specifically for Teams, can use the "Team Members Added" event.
Remember that Teams bots are built on top of the generalised Microsoft Bot Framework, so if you want some more background on Welcome Messages, have a look at https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-send-welcome-message?view=azure-bot-service-4.0&tabs=csharp

Related

How to build in app notification service?

I'm learning backend and API development and trying to understand how to implement some features from scratch without using any paid third party service.
I want to understand this concept from design as well as implementation pov. Please share if you have any resources where I can learn how to code the below service.
How to build in app notification service like one of these from scratch ?
Notification when user likes or comments on a post (Instagram, Twitter)
Notification when someone views your profile (Linkedin)
Notication when a channel you are subscribed to uploads a video (Youtube)
These are different from push notifications like
Notification when someone sends you a message (All chat apps)
Live status via notification of your delivery (Food delivery apps)
Push notifications need not be stored permanently in any database but what happens with in app notifications? How to build such service which is scalable too.
One possible solution I could think of is this, for notification on post like
User A has made a post.
User B likes their post.
From likePost API emit an event which will notify User A that User B liked their post, listen for these real time events on client side. This can be done via sockets.
Do not store any notifications in database, just update the notifications in UI on that event emitted by likePost API or listen to real time changes in likes attribute of a User's Post table (is this possible?) and update UI.
In UI just show all such notifications by fetching from likes and comments table.
But I wonder how scalable is this approach.
I searched but couldn't find any good resources regarding this, so please if anyone could explain this or provide link to any blog or videos it will be helpful.
(P.s. I'm an undergrad student and don't have experience in system design and architectures, just started learning about these so just curious)
Thanks.
apps like Facebook, Instagram and linkedIn provides web hook of notifications. Webhooks allow you to receive real-time HTTP notifications for subscribed events. This functionality is only available for applications with an approved use case for webhooks. Webhhook received as a notification when user comment on your post or like your post, a web hook can be used to retrieve the information of post, comment and commentor etc.
I am attaching a reference of LinkedIn web-hook.
https://learn.microsoft.com/en-us/linkedin/shared/api-guide/webhook-validation

Can i refresh Chat history in Teams #Bot framework

Is there any way to refresh/clear BOT chat history and start new conversation in MS Teams.
If Yes please let me know how to do it .
There is (as of the posting of this answer) no way to delete teams chat history, so there is no way to clear the previous messages of a bot from the teams client. There are ways to clear a bot's conversation state, but as the bot's Microsoft app ID is tied to a Teams app ID as soon as you add the channel, the messages displayed on the teams chat window are there to stay no matter how you handle your bot's state/history storage.
The only work around for this is to remove the bot from Teams entirely, and redeploy it using a new Bot Channels Registration/Web App bot, which doesn't, per se, delete the history so much as create a totally new bot.
For reference:
https://support.office.com/en-us/article/delete-a-chat-in-teams-da6d87ed-59bc-4407-9291-95ee193f8344

Telegram track forwarding and storing

Short:
Is there any way to detect if a user stores or forwards a message (e.g. a video) in a channel?
Long:
I am completely new to programming for Telegram (although am a programmer). So have no idea about the tools that are provided by Telegram's API. I actually found nothing related to this issue browsing the web and Telegram documentations. So I thought someone might have an experience with it.
The scenario is that a client of mine is running a virtual teaching system on Telegram and her problem is that the added members to the channel are able to forward the teaching videos to other persons out of the channel, who have not actually paid the fee. Now is there any work around on earth for this problem?
You can't track user in Telegram, remember this IM is very care about privacy.
Try making it a Bot rather than a channel, you can create bots with a bot in telegram called botfather search it and consider making a bot instead of a channel
there isn't any way to track users to see if they forward or save the videos.
you can only do one of these:
create a bot using telegram api (not telegram bot api) and then send videos as a self destructing message to each user.
or put the videos on a website which only registered users can login and watch.

Skype bot can not be added to group chat

I'm developing a bot for Skype and enabled setting that allows to add this bot to Group Chats. However, when I click to "Add People" button, I can see only the real people, but Skype Bots are hidden there (even the official ones).
There is an official doc that Skype bot can be added to the group chat as regular Skype account, but I am not able to do it.
My bot is not published, but one on one conversation works well. Also, in the private chat with Bot I can add people to conversation and thus I can create a group with this bot, but the main question is how to add the bot to the existing group chat?
On the configuration page for Skype on the dev.botframework.com site. Make sure you've enabled group messaging:
Additional information about groups on skype can be found here.
Finally I was able to add it to the group by opening Web Skype and then opening the private chat with my Bot.
Web Skype showed me a message "Add SkotBot to your contacts" which is very strange because it was already on my contact list. After clicking to this link bot is displayed on the "Add People" list.
I had the similar issues. and I try your method/suggestion above, it works!
the exact steps for other to read on (based on your suggestion)
1. from Mac Client Skype, I'm using version 7.43 (241) make a 1:1 chat with my bot. (to make it appears on the chat history on web skype later)
2. login the web skype, it will appear as history/conversation on the left. Message sending is disabled. Clicking on the bot icon appears on the chat screen above, it will open the profile
3. Add the bot to contact.
4. Then the bot can be added to the existing group conversation, just like add a normal human contact.
It seems to be some bugs in the Skype ecosystem?

Telegram bot doesn't respond in group chats

I made a simple chatbot using Microsoft Bot Framework and integrated it with Telegram.
He works fine whenever I message him privately but whenever I put him in a group with my friends, he doesn't reply, even when I mention him.
/setjoingroups is enabled, and so is /setprivacy.
First make sure it is not caused by Microsoft Bot itself. Then for all normal bots --
Always add a Telegram bot to a group via the bot's info window, instead of inviting the bot to a group via the group's info window.
It's a clear trap for beginners. I'm surprised that Telegram didn't note this in their documentation.
When you configured your bot on Telegram, did you make it an inline bot? It's been my experience that inline bots cannot participate in group chats, but can message privately. If not, please open a GitHub issue here and we'll follow up there.
Beyond all other suggestions like turning off inline functions, setting privacy to disabled and allowing to participate in groups, I also made the bot an admin of my group. And now it processes all messages. That's what's worked for me.
I had this same problem, and I found that I just needed to add the bot as an 'admin' to the chat instead of just a normal member. The telegram bot must have admin privileges to access every message/image that the users of the group-chat send.

Resources