Skip to content

Commit c91b43b

Browse files
authored
Merge pull request #96320 from waynemo/main
ChatQuickstart (iOS): Fix add participant error message logic
2 parents 316b2ac + 1f5fb96 commit c91b43b

File tree

1 file changed

+5
-1
lines changed
  • articles/communication-services/quickstarts/chat/includes

1 file changed

+5
-1
lines changed

articles/communication-services/quickstarts/chat/includes/chat-swift.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,11 @@ let user = ChatParticipant(
345345
chatThreadClient.add(participants: [user]) { result, _ in
346346
switch result {
347347
case let .success(result):
348-
(result.invalidParticipants != nil) ? print("Added participant") : print("Error adding participant")
348+
if let errors = result.invalidParticipants, !errors.isEmpty {
349+
print("Error adding participant")
350+
} else {
351+
print("Added participant")
352+
}
349353
case .failure:
350354
print("Failed to add the participant")
351355
}

0 commit comments

Comments
 (0)