microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
878 stars 484 forks source link

Get a title of a message from TurnContext class. #6720

Closed tatsuya-satake closed 10 months ago

tatsuya-satake commented 11 months ago

🚨 The issue tracker is not for questions 🚨

If you have a question, please ask it on https://stackoverflow.com/questions/tagged/botframework

[question] How can I get a subject from TurnContext.activity? I am sure to get a text but I could not get the one.

This is a result that print(turn_context.activity) in Python. Please tell me a few advice. Thanks.

{
   "additional_properties":{

   },
   "type":"message",
   "id":"1702969246201",
   "timestamp":datetime.datetime(2023, 12, 19, 7, 0, 46, 228612, tzinfo=<isodate.tzinfo.Utc object at 0x7f438c380a60>),
   "local_timestamp":datetime.datetime(2023, 12, 19, 16, 0, 46, 228612, "tzinfo=<FixedOffset""+09:00"">)",
   "local_timezone":"Asia/Tokyo",
   "service_url":"https://smba.trafficmanager.net/jp/",
   "channel_id":"msteams",
   "from_property":<botbuilder.schema._models_py3.ChannelAccount object at 0x7f4385676c20>,
   "conversation":<botbuilder.schema._models_py3.ConversationAccount object at 0x7f4385677ac0>,
   "recipient":<botbuilder.schema._models_py3.ChannelAccount object at 0x7f4385677580>,
   "text_format":"plain",
   "attachment_layout":"None",
   "members_added":"None",
   "members_removed":"None",
   "reactions_added":"None",
   "reactions_removed":"None",
   "topic_name":"None",
   "history_disclosed":"None",
   "locale":"en-US",
   "text":"<at>dev1</at>",
   "speak":"None",
   "input_hint":"None",
   "summary":"None",
   "suggested_actions":"None",
   "attachments":[
      <botbuilder.schema._models_py3.Attachment object at 0x7f438574ba60>
   ],
   "entities":[
      <botbuilder.schema._models_py3.Entity object at 0x7f438574ae30>,
      <botbuilder.schema._models_py3.Entity object at 0x7f438574afb0>
   ],
   "channel_data":{
      "teamsChannelId":"19:4d8581003f1a48c09657e7439bae364d@thread.tacv2",
      "teamsTeamId":"19:4d8581003f1a48c09657e7439bae364d@thread.tacv2",
      "channel":{
         "id":"19:4d8581003f1a48c09657e7439bae364d@thread.tacv2"
      },
      "team":{
         "id":"19:4d8581003f1a48c09657e7439bae364d@thread.tacv2"
      },
      "tenant":{
         "id":"ce58bd37-0571-4720-95ce-8e758c7bfcdb"
      }
   },
   "action":"None",
   "reply_to_id":"None",
   "label":"None",
   "value_type":"None",
   "value":"None",
   "name":"None",
   "relates_to":"None",
   "code":"None",
   "expiration":"None",
   "importance":"None",
   "delivery_mode":"None",
   "listen_for":"None",
   "text_highlights":"None",
   "semantic_action":"None",
   "caller_id":"<CallerIdConstants.public_azure_channel":"urn:botframework:azure"">"
}
dmvtech commented 10 months ago

The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repos are the preferred platform for submitting bug fixes and feature requests.

dmvtech commented 10 months ago

I'm not sure what is meant by subject. But if you still need help with this, please open a question in Stack Overflow.