Skip to content

Commit 62d7366

Browse files
Set TeamsNotifyUser alert to opposite of alert_in_meeting (#2185)
Co-authored-by: tracyboehrer <[email protected]>
1 parent a9298c8 commit 62d7366

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

libraries/botbuilder-core/botbuilder/core/teams/teams_activity_extensions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def teams_notify_user(
7171
activity.channel_data = {}
7272

7373
channel_data = TeamsChannelData().deserialize(activity.channel_data)
74-
channel_data.notification = NotificationInfo(alert=True)
74+
channel_data.notification = NotificationInfo(alert=not alert_in_meeting)
7575
channel_data.notification.alert_in_meeting = alert_in_meeting
7676
channel_data.notification.external_resource_url = external_resource_url
7777
activity.channel_data = channel_data

libraries/botbuilder-core/tests/teams/test_teams_extension.py

+11
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,17 @@ def test_teams_notify_user(self):
155155
# Assert
156156
assert activity.channel_data.notification.alert
157157

158+
def test_teams_notify_user_alert_in_meeting(self):
159+
# Arrange
160+
activity = Activity()
161+
162+
# Act
163+
teams_notify_user(activity, alert_in_meeting=True)
164+
165+
# Assert
166+
assert activity.channel_data.notification.alert_in_meeting is True
167+
assert activity.channel_data.notification.alert is False
168+
158169
def test_teams_notify_user_with_no_activity(self):
159170
# Arrange
160171
activity = None

0 commit comments

Comments
 (0)