Can i refresh Chat history in Teams #Bot framework - .net-core

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

Related

Activity after deep linking a chat in teams

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

How can a telegram get a list of all chats he participates in?

Relates to Retrieve all chat ids using Telegram bot but 3 years later.
My use case is a bot that notifies chat participants of home automation events. Any user might create his own chat and receive events or send commands.
Currently, it seems that the bot has no option to find the chats that it participates in. Even a potential workaround like using GetUpdates(0) seems to retrieve only new message ids which makes it impossible to get a complete list of chats from looking at the received messages.
Is there a stable solution for doing this?
This is not possible from Telegram's API. Howerver,
A bot will receive a new_chat_members which could be the bot 'joining another group':
new_chat_members -- Array of User -- Optional.
New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
To remember each user/group, you'll have to save each chat/user_id into a database.
The bot will also receive the opposite left_chat_member so you'll know when to delete a database entry.

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.

Change telegram bot owner

We have created telegram bot which has many difficult operations. Bot was created by one developer using his phone number. Is it possible change bot's owner or add another user as admin to bot?
Recently, the function of transferring the bot to another person appeared.
One of possible solutions (most simple as I wonder) is in the creation a new bot with same username. So only need to delete your old bot, create new and change bot token in your program code.
Note that it's possible only if the old bot's owner collaborates. To prevent similar situations your company need to create one telegram account for creating bots, channels etc., without ties to concrete persons.
UPD 2020
Telegram teem finally did the trick and added the changing ownership feature. Bingo. But this will not help if you can't ping an owner, same.
Please see Bekorchi's answer, it's possible to transfer bots since 2020 October.
Out-dated:
Not possible to transfer by #BotFather command at this time (2017 July).
You can contact human supporter #BotSupport, they may have permission to transfer that.
the developer can delete all of other bots and channel and chat history, then use CHANGE NUMBER in setting and transfer the bot to new virgin mobile number.
after this, the developer can login again with his/her own mobile number to telegram as new account.
Nowdays (October 2022) you can transfer bot ownership. But you can't do it via web version
(see, Yes option is disabled)
Yet, you can do it via mobile version:
but you should fulfill following demands:
P.S. If you have enough rights please move my note to a comment of the proper answer

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?

Resources