Skip to content

Commit 76077c3

Browse files
Fix Nonetype
1 parent f763477 commit 76077c3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎libraries/microsoft-agents-a365-notifications/microsoft_agents_a365/notifications/agent_notification.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ def on_agent_notification(
6161

6262
def route_selector(context: TurnContext) -> bool:
6363
ch = context.activity.channel_id
64-
received_channel = ch.channel if ch else ""
65-
received_subchannel = ch.sub_channel if ch else ""
66-
received_channel = received_channel.lower()
67-
received_subchannel = received_subchannel.lower()
64+
received_channel = (ch.channel if ch else "").lower()
65+
received_subchannel = (ch.sub_channel if ch and ch.sub_channel else "").lower()
6866
if received_channel != registered_channel:
6967
return False
7068
if registered_subchannel == "*":

0 commit comments

Comments
 (0)