-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webchat not populating localTimestamp and localTimezone properties #3788
Comments
From Eric: LocalTimestamp field is empty: Emulator is setting localTimestamp here: Should we re-open this DL-JS issue, or do you have a different recommendation for this? |
Clarification: does this mean that the timestamp is not showing in the Web Chat UI on the 'Test in Web Chat' panel on ABS? Or is this in regards to the activity data? If it's the latter, I think reopening the DLJS issue is the right call. If it's a UI issue, I can look into it further if we can get more repro information. |
@corinagum it is the latter (when the activity arrives at the bot, these fields are not populated) |
This is not just DLJS but would need to be added to any chat adapter. |
When working on this, please also fix #2588. |
Working on this now.
|
Even though Web Chat send out an activity to ABS with Activity received on the bot side, after Web Chat sent out an activity with time zone of Japan. See highlighted. Original activity from Web Chat(Capture from network trace) {
"channelData": {
"clientActivityID": "1621475335684ql44o56fi4",
"clientTimestamp": "2021-05-20T01:48:55.684Z"
},
"text": "dump-activity",
"textFormat": "plain",
"type": "message",
"channelId": "webchat",
"from": {
"id": "dl_3fc4640be134b83b9b3f71c853ffba4a",
"name": "",
"role": "user"
},
"locale": "en-US",
+ "localTimestamp": "2021-05-20T10:48:55.684+09:00",
+ "localTimezone": "Asia/Tokyo",
"timestamp": "2021-05-20T01:48:55.684Z",
"entities": [
{
"requiresBotState": true,
"supportsListening": true,
"supportsTts": true,
"type": "ClientCapabilities"
}
]
} Perceived activity on bot side {
"type": "message",
"id": "IXiRn3wwW8lI2WShb0KaXA-o|0000000",
"timestamp": "2021-05-20T01:48:55.506Z",
+ "localTimestamp": "2021-05-20T01:48:55.684Z",
+ "localTimezone": "Asia/Tokyo",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "dl_3fc4640be134b83b9b3f71c853ffba4a",
"name": ""
},
"conversation": {
"id": "IXiRn3wwW8lI2WShb0KaXA-o"
},
"recipient": {
"id": "webchat-mockbot@WYDIyKwAZCw",
"name": "webchat-mockbot"
},
"textFormat": "plain",
"locale": "en-US",
"text": "dump-activity",
"entities": [
{
"type": "ClientCapabilities",
"requiresBotState": true,
"supportsListening": true,
"supportsTts": true
}
],
"channelData": {
"clientActivityID": "1621475335684ql44o56fi4",
"clientTimestamp": "2021-05-20T01:48:55.684Z"
},
"rawTimestamp": "2021-05-20T01:48:55.5067653Z",
+ "rawLocalTimestamp": "2021-05-20T10:48:55.684+09:00",
"callerId": "urn:botframework:azure"
} |
Thank you.
What do we need to upgrade to take an advantage of the localtimestamp feature?
Thanks,
Hiro
Sent with BlackBerry Work
(www.blackberry.com)
From: William Wong ***@***.******@***.***>>
Date: Wednesday, May 19, 2021, 6:33 PM
To: microsoft/BotFramework-WebChat ***@***.******@***.***>>
Cc: Yamaguchi.Hiro ***@***.******@***.***>>, Manual ***@***.******@***.***>>
Subject: Re: [microsoft/BotFramework-WebChat] Webchat not populating localTimestamp and localTimezone properties (#3788)
ATTENTION: This e-mail came from an external source. Do not open attachments or click on links from unknown or unexpected emails.
Even though Web Chat send out an activity to ABS with localTimestamp. The bot developer will need to retrieve them using rawLocalTimestamp.
Activity received on the bot side, after Web Chat sent out an activity with time zone of Japan.
{
"type": "message",
"id": "3HIorx83j1xAJSLl4II4sK-o|0000000",
"timestamp": "2021-05-20T01:23:50.933Z",
"localTimestamp": "2021-05-20T01:23:51.000Z",
"localTimezone": "Asia/Tokyo",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "dl_2793ad24dffe05f3fdf13cc683dd69ba",
"name": ""
},
"conversation": {
"id": "3HIorx83j1xAJSLl4II4sK-o"
},
"recipient": {
"id": "webchat-mockbot@WYDIyKwAZCw",
"name": "webchat-mockbot"
},
"textFormat": "plain",
"locale": "en-US",
"text": "dump-activity",
"entities": [
{
"type": "ClientCapabilities",
"requiresBotState": true,
"supportsListening": true,
"supportsTts": true
}
],
"channelData": {
"clientActivityID": "1621473831109mux9a3motu",
"clientTimestamp": "2021-05-20T01:23:51.109Z"
},
"rawTimestamp": "2021-05-20T01:23:50.9334271Z",
"rawLocalTimestamp": "2021-05-20T10:23:51+09:00",
"callerId": "urn:botframework:azure"
}
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#3788 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ74QU6LJUGUPPGT4PTBUJ3TORRCRANCNFSM4Y6SUGFA>.
|
Describe the bug
Customer wants to know the following which we do not have an answer for:
I would like to know the reason why localTimezone and localTimestamp in Activity (Microsoft.Bot.Schema.Activity) are always empty when running as App Service. When we run on emulator on our local Mac machine, it always has a valid timestamp and timezone
Steps to reproduce
Confirmed that localTimestamp is not populated from webchat when bot is published in Azure. I am not sure how customer is accessing localTimezone property as the IMessageActivity interface that we use does not implement that property but the generic Activity does have a localTimezone property.
Additional context
[Bug]
The text was updated successfully, but these errors were encountered: