I've successfully created a chatBot using bot framework SDKV4 in C# with the WebChannel as the channel. Everything is functioning properly, but I have a specific goal in mind:
For each message that the user types or the Bot replies to, I want a time stamp to be included. For instance, if we consider a simple echo bot where it echoes back what the user typed, the conversation might look like this:
User: Hi
a minute ago
Bot: You Typed Hi
2 minutes ago
In its current state, the Bot would display the time stamp as something generic like "JustNow" under each message in the WebChannel.
What I desire is to show the precise time:
User: Hi
10:00 AM
Bot: You typed: Hi
10:01 AM
If displaying only the time is not feasible, then showing the full date or both date and time is acceptable too. However, I am unsure how to accomplish this.
I did some research but couldn't find a definitive solution. Although I came across the following GitHub link, it led me to a 404 error page:
https://github.com/Microsoft/BotFramework-WebChat/blob/preview/samples/timestamp-grouping/index.html
This was brought up in a Github issue post:
https://github.com/microsoft/BotFramework-WebChat/issues/985
Since my bot uses a Web channel, I attempted to include the following style option in my index.html page: groupTimestamp: true
However, this didn't provide much assistance.
To clarify my concern further: When inspecting the Bot's page, I observed the following:
https://i.stack.imgur.com/UuwwM.png
Currently, it shows "25 mins ago," whereas I aim to exhibit the exact time stamp directly above the one highlighted in the inspect image provided above.
Could someone please advise me on how to achieve my aforementioned request?
Thank you in advance,
Best regards,
ChaitanyaNG