File tree Expand file tree Collapse file tree 7 files changed +19
-17
lines changed
articles/communication-services/concepts/includes/identifiers Expand file tree Collapse file tree 7 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -125,12 +125,12 @@ if (communicationIdentifier instanceof CommunicationUserIdentifier) {
125
125
else if (communicationIdentifier instanceof MicrosoftTeamsUserIdentifier ) {
126
126
Log . i(tag, " Teams user: " + ((MicrosoftTeamsUserIdentifier )communicationIdentifier). getUserId());
127
127
}
128
+ else if (communicationIdentifier instanceof MicrosoftTeamsAppIdentifier ) {
129
+ Log . i(tag, " Teams app: " + (( MicrosoftTeamsAppIdentifier )communicationIdentifier). getAppId());
130
+ }
128
131
else if (communicationIdentifier instanceof PhoneNumberIdentifier ) {
129
132
Log . i(tag, " Phone number: " + ((PhoneNumberIdentifier )communicationIdentifier). getPhoneNumber());
130
133
}
131
- else if (communicationIdentifier instanceof MicrosoftBotIdentifier ) {
132
- Log . i(tag, " Microsoft bot: " + ((MicrosoftBotIdentifier )communicationIdentifier). getBotId());
133
- }
134
134
else if (communicationIdentifier instanceof UnknownIdentifier ) {
135
135
Log . i(tag, " Unkown user: " + ((UnknownIdentifier )communicationIdentifier). getId());
136
136
}
Original file line number Diff line number Diff line change @@ -113,10 +113,10 @@ switch (communicationIdentifier)
113
113
print (#" Communication user: \(communicationUser.id)"# )
114
114
case let teamsUser as MicrosoftTeamsUserIdentifier:
115
115
print (#" Teams user: \(teamsUser.UserId)"# )
116
+ case let teamsApp as microsoftTeamsApp:
117
+ print (#" Teams app: \(teamsApp.appId)"# )
116
118
case let phoneNumber as PhoneNumberIdentifier:
117
119
print (#" Phone number: \(phoneNumber.PhoneNumber)"# )
118
- case let bot as MicrosoftBotIdentifier:
119
- print (#" Microsoft bot: \(bot.botId)"# )
120
120
case let unknown as UnknownIdentifier:
121
121
print (#" Unknown: \(unknown.Id)"# )
122
122
@unknown default :
Original file line number Diff line number Diff line change @@ -125,12 +125,12 @@ if (communicationIdentifier instanceof CommunicationUserIdentifier) {
125
125
else if (communicationIdentifier instanceof MicrosoftTeamsUserIdentifier ) {
126
126
System . out. println(" Teams user: " + ((MicrosoftTeamsUserIdentifier )communicationIdentifier). getUserId());
127
127
}
128
+ else if (communicationIdentifier instanceof MicrosoftTeamsAppIdentifier ) {
129
+ Log . i(tag, " Teams app: " + (( MicrosoftTeamsAppIdentifier )communicationIdentifier). getAppId());
130
+ }
128
131
else if (communicationIdentifier instanceof PhoneNumberIdentifier ) {
129
132
System . out. println(" Phone number: " + ((PhoneNumberIdentifier )communicationIdentifier). getPhoneNumber());
130
133
}
131
- else if (communicationIdentifier instanceof MicrosoftBotIdentifier ) {
132
- Log . i(tag, " Microsoft bot: " + ((MicrosoftBotIdentifier )communicationIdentifier). getBotId());
133
- }
134
134
else if (communicationIdentifier instanceof UnknownIdentifier ) {
135
135
System . out. println(" Unkown user: " + ((UnknownIdentifier )communicationIdentifier). getId());
136
136
}
Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ switch (communicationIdentifier.kind)
124
124
// narrowed to MicrosoftTeamsUserKind
125
125
console .log (` Teams user: ${ communicationIdentifier .microsoftTeamsUserId } ` );
126
126
break ;
127
+ case " microsoftTeamsApp" :
128
+ // narrowed to MicrosoftTeamsAppIdentifier
129
+ console .log (` Teams app: ${ communicationIdentifier .teamsAppId } ` );
130
+ break ;
127
131
case " phoneNumber" :
128
132
// narrowed to PhoneNumberKind
129
133
console .log (` Phone number: ${ communicationIdentifier .phoneNumber } ` );
@@ -132,10 +136,6 @@ switch (communicationIdentifier.kind)
132
136
// narrowed to UnknownIdentifierKind
133
137
console .log (` Unknown: ${ communicationIdentifier .id } ` );
134
138
break ;
135
- case " microsoftBot" :
136
- // narrowed to MicrosoftBotIdentifier
137
- console .log (` Microsoft bot: ${ communicationIdentifier .botId } ` );
138
- break ;
139
139
default :
140
140
// be careful here whether you want to throw because a new SDK version
141
141
// can introduce new identifier types
Original file line number Diff line number Diff line change @@ -127,12 +127,12 @@ switch (communicationIdentifier)
127
127
case MicrosoftTeamsUserIdentifier teamsUser :
128
128
Console .WriteLine ($" Teams user: {teamsUser .UserId }" );
129
129
break ;
130
+ case MicrosoftTeamsAppIdentifier teamsApp :
131
+ Console .WriteLine ($" Teams app: {teamsApp .AppId }" );
132
+ break ;
130
133
case PhoneNumberIdentifier phoneNumber :
131
134
Console .WriteLine ($" Phone number: {phoneNumber .PhoneNumber }" );
132
135
break ;
133
- case MicrosoftBotIdentifier bot :
134
- Console .WriteLine ($" Microsoft bot: {bot .BotId }" );
135
- break ;
136
136
case UnknownIdentifier unknown :
137
137
Console .WriteLine ($" Unknown: {unknown .Id }" );
138
138
break ;
Original file line number Diff line number Diff line change @@ -121,10 +121,10 @@ match communication_identifier.kind:
121
121
print (f " Communication user: { communication_identifier.properties[' id' ]} " )
122
122
case CommunicationIdentifierKind.MICROSOFT_TEAMS_USER :
123
123
print (f " Teams user: { communication_identifier.properties[' user_id' ]} " )
124
+ case CommunicationIdentifierKind.MICROSOFT_TEAMS_APP :
125
+ print (f " Teams app: { communication_identifier.properties[' app_id' ]} " )
124
126
case CommunicationIdentifierKind.PHONE_NUMBER :
125
127
print (f " Phone number: { communication_identifier.properties[' value' ]} " )
126
- case CommunicationIdentifierKind.MICROSOFT_BOT :
127
- print (f " Microsoft bot: { communication_identifier.properties[' bot_id' ]} " )
128
128
case CommunicationIdentifierKind.UNKNOWN :
129
129
print (f " Unknown: { communication_identifier.raw_id} " )
130
130
case _:
Original file line number Diff line number Diff line change @@ -227,6 +227,8 @@ if (communicationIdentifier.communicationUser) {
227
227
console .log (` Communication user: ${ communicationIdentifier .communicationUser .id } ` );
228
228
} else if (communicationIdentifier .microsoftTeamsUser ) {
229
229
console .log (` Teams user: ${ communicationIdentifier .microsoftTeamsUser .userId } ` );
230
+ } else if (communicationIdentifier .microsoftTeamsApp ) {
231
+ console .log (` Teams app: ${ communicationIdentifier .microsoftTeamsApp .appId } ` );
230
232
} else if (communicationIdentifier .phoneNumber ) {
231
233
console .log (` Phone number: ${ communicationIdentifier .phoneNumber .value } ` );
232
234
} else {
You can’t perform that action at this time.
0 commit comments