@@ -639,7 +639,12 @@ def create_reply(self, text: str = None, locale: str = None):
639
639
id = self .from_property .id if self .from_property else None ,
640
640
name = self .from_property .name if self .from_property else None ,
641
641
),
642
- reply_to_id = self .id ,
642
+ reply_to_id = (
643
+ self .id
644
+ if not type == ActivityTypes .conversation_update
645
+ or self .channel_id not in ["directline" , "webchat" ]
646
+ else None
647
+ ),
643
648
service_url = self .service_url ,
644
649
channel_id = self .channel_id ,
645
650
conversation = ConversationAccount (
@@ -681,7 +686,12 @@ def create_trace(
681
686
id = self .from_property .id if self .from_property else None ,
682
687
name = self .from_property .name if self .from_property else None ,
683
688
),
684
- reply_to_id = self .id ,
689
+ reply_to_id = (
690
+ self .id
691
+ if not type == ActivityTypes .conversation_update
692
+ or self .channel_id not in ["directline" , "webchat" ]
693
+ else None
694
+ ),
685
695
service_url = self .service_url ,
686
696
channel_id = self .channel_id ,
687
697
conversation = ConversationAccount (
@@ -737,7 +747,12 @@ def get_conversation_reference(self):
737
747
:returns: A conversation reference for the conversation that contains this activity.
738
748
"""
739
749
return ConversationReference (
740
- activity_id = self .id ,
750
+ activity_id = (
751
+ self .id
752
+ if not type == ActivityTypes .conversation_update
753
+ or self .channel_id not in ["directline" , "webchat" ]
754
+ else None
755
+ ),
741
756
user = self .from_property ,
742
757
bot = self .recipient ,
743
758
conversation = self .conversation ,
0 commit comments