Nov 14 2022 10:29 PM
The localTimezone field is missing from Activity in Bot when using our bot/app in iOS.
Docs for reference:
https://learn.microsoft.com/en-us/javascript/api/botframework-schema/activity?view=botbuilder-ts-lat...
Kindly advise if this is a bug or if not, where can we retrieve this information when missing?
Thanks.
Nov 14 2022 10:48 PM
Nov 15 2022 08:17 PM - edited Nov 16 2022 08:32 PM
@vannyconoza -
We have tested this using below code and In android we are getting localtimezonevalue.
protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
{
var localetimezone = turnContext.Activity.Entities[0].Properties.ToString(); ;
var reply = MessageFactory.Text(localetimezone);
await turnContext.SendActivityAsync(reply, cancellationToken);
}
Ref Doc: Get context for your Microsoft Teams bot - Teams | Microsoft Learn
Could you please share the code snippet which you are trying? Are you getting localtimezone in Teams web and desktop client?
Nov 15 2022 10:16 PM
@Nivedipa-MSFT The localTimezone is missing from
Nov 16 2022 04:34 AM - edited Nov 16 2022 04:39 AM
@vannyconoza
We have tested this using TeamsActivityHandler.handleTeamsMessagingExtensionSubmitAction
method but still in android we are getting localtimezone value.
Could you please update the Teams version and check again?
Nov 16 2022 10:41 AM
@Nivedipa-MSFT Just tested on ios, Teams version is updated (version 4.19.0), running on iOS 16.1.
Below is the context. No localTimezone in context.activity, no timezone in context.activity.entities[0]
{
"_respondedRef": {
"responded": false
},
"_turnState": {
"turn": {
"locale": "en-US"
}
},
"_onSendActivities": [],
"_onUpdateActivity": [],
"_onDeleteActivity": [],
"_turn": "turn",
"_locale": "locale",
"bufferedReplyActivities": [],
"_adapter": {
"middleware": {
"middleware": [
null
]
},
"settings": {
"appId": "<appId>",
"appPassword": "<appPassword>"
},
"credentials": {
"name": "MicrosoftAppCredentials",
"appId": "<appId>",
"tenant": "botframework.com",
"oAuthEndpoint": "https://login.microsoftonline.com/botframework.com",
"oAuthScope": "https://api.botframework.com"
},
"credentialsProvider": {
"name": "SimpleCredentialProvider",
"appId": "<appId>"
},
"isEmulatingOAuthCards": false,
"authConfiguration": {
"requiredEndorsements": []
}
},
"_activity": {
"name": "composeExtension/submitAction",
"type": "invoke",
"timestamp": "2022-11-16T18:10:52.806Z",
"localTimestamp": "2022-11-16T18:10:52.806Z",
"id": "f:783fa7b6-c86b-55f5-0ffc-d9c5dc2abd1e",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/apac/",
"from": {
"id": "29:1h_HSr4azCfMbIlf7mWvY3-ot-GEgd9WefL2wGDwg24mR1n1NcRkzqxAVFW5SdoMpaGm_JGeZczJ-EIqfmLur4Q",
"name": "Vanny Conoza",
"aadObjectId": "4e1a9e1d-017f-4585-897b-c53f5c056efb"
},
"conversation": {
"isGroup": true,
"conversationType": "channel",
"tenantId": "d19780c8-d5df-4eee-84b0-dcac4f1fbfde",
"id": "19:7ixebHp2E-koa1L8rn-dizrPLcqL6kROYvU1Nsivvu41@thread.tacv2"
},
"recipient": {
"id": "28:9dd5378d-4419-48cf-933a-dcaa161083a6",
"name": "Pigeonhole Live Bot"
},
"entities": [
{
"locale": "en-US",
"country": "SG",
"platform": "iOS",
"type": "clientInfo"
}
],
"channelData": {
"channel": {
"id": "19:7ixebHp2E-koa1L8rn-dizrPLcqL6kROYvU1Nsivvu41@thread.tacv2"
},
"team": {
"id": "19:7ixebHp2E-koa1L8rn-dizrPLcqL6kROYvU1Nsivvu41@thread.tacv2"
},
"tenant": {
"id": "d19780c8-d5df-4eee-84b0-dcac4f1fbfde"
},
"source": {
"name": "compose"
},
"legacy": {
"replyToId": "1:1zJr2iwmQ-o2PHY1__YULWWz4xJSGZm_ibZjGx51c2vk"
}
},
"replyToId": "0",
"value": {
"commandId": "createQuestionAnswer",
"data": {
"type": "workspaceSelection",
"workspace": "<appRelatedData>"
},
"state": "",
"tabContext": {},
"context": {
"theme": "dark"
}
},
"locale": "en-US",
"rawTimestamp": "2022-11-16T18:10:52.806Z",
"rawLocalTimestamp": "2022-11-17T02:10:52.806+08:00",
"callerId": "urn:botframework:azure"
}
}
Nov 16 2022 10:45 AM
Nov 16 2022 10:10 PM
Nov 17 2022 12:12 AM
@vannyconoza - We have tested this on IOS version 15.7.1 and Teams version 4.19.0. We are getting value of the localTimezone in context.activity.entities[0]
Nov 21 2022 04:33 AM