botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Unable to get username from an activity originated from the latest version of Skype

Open ItsMeArthur opened this issue 8 years ago • 4 comments

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3.14.1.1
  • Active Channels: Skype
  • Deployment Environment: Azure Bot Service, Azure App Service

Issue Description

When using the latest version of Skype (Version 12.1811.248.0) that I was able to install on my Windows 10 machines I'm not able to get the username of the user by accessing the activity.From.Name property. I' however able to do that when using the Android version of Skype, the online version, and older desktop versions, such as versions 8.18.0.6 and 7.41.0.101. I have a few broken bots because I use the username in order to perform some operations within my bots.

Code Example

Post method within the MessagesController:

public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
{
	if (activity.Type == ActivityTypes.Message)
	{
		Activity reply = activity.CreateReply($"Name: {activity.From.Name} | Id: {activity.From.Id}");
		ConnectorClient client = new ConnectorClient(new Uri(activity.ServiceUrl));
		await client.Conversations.ReplyToActivityAsync(reply);
	}
	else
	{
		HandleSystemMessage(activity);
	}
	var response = Request.CreateResponse(HttpStatusCode.OK);
	return response;
}

Expected Behavior

When running an bot application with this code, having Skype as the integrated channel I would expect the application to print the Name and Id of the Skype user:

Name: Arthur de Andrade | Id: 29:5s8s4ass84asdw8as4d54sas2wwaa5sd5mmw

Actual Results

Instead of the expected behavior I get the response from the Skype bot containing only the Id of the user, but no information regarding the username:

Name: | Id: 29:5s8s4ass84asdw8as4d54sas2wwaa5sd5mmw

Is this a problem with the Bot Builder or with Skype. I'm using the latest version of the bot builder, and I tried to use previous versions but the problem persisted. Am I not allowed anymore to get the username of the Skype user?

ItsMeArthur avatar Mar 27 '18 16:03 ItsMeArthur

Hi @ItsMeArthur

I've asked the Skype team for clarification on this. I'll get back to you once I receive a response from them.

EricDahlvang avatar Mar 27 '18 18:03 EricDahlvang

Even I am experiencing the same problem in skype store app. But there isn't any problem in web.skype and skype mobile app.

annevah avatar Mar 28 '18 12:03 annevah

The Skype UWP client team is aware of this issue, but they do not yet have a timeline to share for when it will be fixed. I'll keep you updated as I hear more information.

EricDahlvang avatar Apr 04 '18 06:04 EricDahlvang

Closing the issue assuming it as resolved. Please reopen a new issue if it still persists.

fanidamj-zz avatar Jun 22 '18 00:06 fanidamj-zz