File tree Expand file tree Collapse file tree 5 files changed +14
-0
lines changed
articles/communication-services/concepts/includes/identifiers Expand file tree Collapse file tree 5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ switch (communicationIdentifier)
120
120
print (#" Teams user: \(teamsUser.UserId)"# )
121
121
case let phoneNumber as PhoneNumberIdentifier:
122
122
print (#" Phone number: \(phoneNumber.PhoneNumber)"# )
123
+ case let bot as MicrosoftBotIdentifier:
124
+ print (#" Microsoft bot: \(bot.botId)"# )
123
125
case let unknown as UnknownIdentifier:
124
126
print (#" Unknown: \(unknown.Id)"# )
125
127
@unknown default :
Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ else if (communicationIdentifier instanceof MicrosoftTeamsUserIdentifier) {
133
133
else if (communicationIdentifier instanceof PhoneNumberIdentifier ) {
134
134
System . out. println(" Phone number: " + ((PhoneNumberIdentifier )communicationIdentifier). getPhoneNumber());
135
135
}
136
+ else if (communicationIdentifier instanceof MicrosoftBotIdentifier ) {
137
+ Log . i(tag, " Microsoft bot: " + ((MicrosoftBotIdentifier )communicationIdentifier). getBotId());
138
+ }
136
139
else if (communicationIdentifier instanceof UnknownIdentifier ) {
137
140
System . out. println(" Unkown user: " + ((UnknownIdentifier )communicationIdentifier). getId());
138
141
}
Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ switch (communicationIdentifier.kind)
137
137
// narrowed to UnknownIdentifierKind
138
138
console .log (` Unknown: ${ communicationIdentifier .id } ` );
139
139
break ;
140
+ case " microsoftBot" :
141
+ // narrowed to MicrosoftBotIdentifier
142
+ console .log (` Microsoft bot: ${ communicationIdentifier .botId } ` );
143
+ break ;
140
144
default :
141
145
// be careful here whether you want to throw because a new SDK version
142
146
// can introduce new identifier types
Original file line number Diff line number Diff line change @@ -135,6 +135,9 @@ switch (communicationIdentifier)
135
135
case PhoneNumberIdentifier phoneNumber :
136
136
Console .WriteLine ($" Phone number: {phoneNumber .PhoneNumber }" );
137
137
break ;
138
+ case MicrosoftBotIdentifier bot :
139
+ Console .WriteLine ($" Microsoft bot: {bot .BotId }" );
140
+ break ;
138
141
case UnknownIdentifier unknown :
139
142
Console .WriteLine ($" Unknown: {unknown .Id }" );
140
143
break ;
Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ match communication_identifier.kind:
129
129
print (f " Teams user: { communication_identifier.properties[' user_id' ]} " )
130
130
case CommunicationIdentifierKind.PHONE_NUMBER :
131
131
print (f " Phone number: { communication_identifier.properties[' value' ]} " )
132
+ case CommunicationIdentifierKind.MICROSOFT_BOT :
133
+ print (f " Microsoft bot: { communication_identifier.properties[' bot_id' ]} " )
132
134
case CommunicationIdentifierKind.UNKNOWN :
133
135
print (f " Unknown: { communication_identifier.raw_id} " )
134
136
case _:
You can’t perform that action at this time.
0 commit comments