You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/chat/includes/meeting-interop-swift.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ In this quickstart, you'll learn how to chat in a Teams meeting using the Azure
16
16
17
17
## Joining the meeting chat
18
18
19
-
A Communication Services user can join a Teams meeting as an anonymous user using the Calling SDK. Joining the meeting will add them as a participant to the meeting chat as well, where they can send and receive messages with other users in the meeting. The user will not have access to chat messages that were sent before they joined the meeting and they will not be able to send or receive messages after the meeting ends. To join the meeting and start chatting, you can follow the next steps.
19
+
A Communication Services user can join a Teams meeting as an anonymous user using the Calling SDK. Joining the meeting adds them as a participant to the meeting chat as well, where they can send and receive messages with other users in the meeting. The user will not have access to chat messages that were sent before they joined the meeting and they will not be able to send or receive messages after the meeting ends. To join the meeting and start chatting, you can follow the next steps.
20
20
21
21
## Add Chat to the Teams calling app
22
22
@@ -61,7 +61,7 @@ In `ContentView.swift` add the following snippet below the existing state variab
61
61
62
62
Replace `<YOUR_DISPLAY_NAME_HERE>` with the display name you'd like to use in the Chat.
63
63
64
-
Next we will modify the form `Section` to display our chat messages and add UI controls for chatting.
64
+
Next we modify the form `Section` to display our chat messages and add UI controls for chatting.
65
65
66
66
Add the following snippet to the existing form. Right after the Text view `Text(recordingStatus)`, for recording status.
67
67
@@ -99,9 +99,9 @@ Next change the title to `Chat Teams Quickstart`. Modify the following line with
99
99
100
100
### Initialize the ChatClient
101
101
102
-
Instantiate the `ChatClient` and enable real-time notifications. We will be using real-time notifications for receiving chat messages.
102
+
Instantiate the `ChatClient` and enable real-time notifications. We are using real-time notifications for receiving chat messages.
103
103
104
-
Inside the `NavigationView``.onAppear` add the snippet below, after the existing code that initializes the `CallAgent`.
104
+
Inside the `NavigationView``.onAppear`, add the snippet below, after the existing code that initializes the `CallAgent`.
105
105
106
106
```
107
107
// Initialize the ChatClient
@@ -145,7 +145,7 @@ Read more about user access tokens: [User Access Token](../../identity/access-to
145
145
146
146
Inside the existing `joinTeamsMeeting()` function, we will initialize the `ChatThreadClient` after the user has joined the meeting.
147
147
148
-
Inside the completion handler for the call to `self.callAgent?.join()` add the code below the comment `// Initialize the ChatThreadClient`. The full code is shown below.
148
+
Inside the completion handler for the call to `self.callAgent?.join()`, add the code below the comment `// Initialize the ChatThreadClient`. The full code is shown below.
149
149
150
150
```
151
151
self.callAgent?.join(with: teamsMeetingLinkLocator, joinCallOptions: joinCallOptions) { (call, error) in
Add the `sendMessage()` function to `ContentView`. This function will use the `ChatThreadClient` to send messages from the user.
193
+
Add the `sendMessage()` function to `ContentView`. This function uses the `ChatThreadClient` to send messages from the user.
194
194
195
195
```
196
196
func sendMessage() {
@@ -214,9 +214,9 @@ func sendMessage() {
214
214
215
215
### Enable receiving messages
216
216
217
-
To receive messages we will implement the handler for `ChatMessageReceived` events. When new messages are sent to the thread, this handler will add the messages to the `meetingMessages` variable so they can be displayed in the UI.
217
+
To receive messages, we implement the handler for `ChatMessageReceived` events. When new messages are sent to the thread, this handler adds the messages to the `meetingMessages` variable so they can be displayed in the UI.
218
218
219
-
First add the following struct to `ContentView.swift`. The UI will use the data in the struct to display our Chat messages.
219
+
First add the following struct to `ContentView.swift`. The UI uses the data in the struct to display our Chat messages.
When the user leaves the Team's meeting we will clear the Chat from the UI. The full code is shown below.
250
+
When the user leaves the Team's meeting, we clear the Chat from the UI. The full code is shown below.
251
251
252
252
```
253
253
func leaveMeeting() {
@@ -271,19 +271,19 @@ func leaveMeeting() {
271
271
272
272
The Teams meeting details can be retrieved using Graph APIs, detailed in [Graph documentation](/graph/api/onlinemeeting-createorget?tabs=http&view=graph-rest-beta&preserve-view=true). The Communication Services Calling SDK accepts a full Teams meeting link or a meeting ID. They are returned as part of the `onlineMeeting` resource, accessible under the [`joinWebUrl` property](/graph/api/resources/onlinemeeting?view=graph-rest-beta&preserve-view=true)
273
273
274
-
With the [Graph APIs](/graph/api/onlinemeeting-createorget?tabs=http&view=graph-rest-beta&preserve-view=true), you can also obtain the `threadID`. The response will have a `chatInfo` object that contains the `threadID`.
274
+
With the [Graph APIs](/graph/api/onlinemeeting-createorget?tabs=http&view=graph-rest-beta&preserve-view=true), you can also obtain the `threadID`. The response has a `chatInfo` object that contains the `threadID`.
275
275
276
276
You can also get the required meeting information and thread ID from the **Join Meeting** URL in the Teams meeting invite itself.
277
-
A Teams meeting link looks like this: `https://teams.microsoft.com/l/meetup-join/meeting_chat_thread_id/1606337455313?context=some_context_here`. The `threadID`will be where `meeting_chat_thread_id` is in the link. Ensure that the `meeting_chat_thread_id` is unescaped before use. It should be in the following format: `19:meeting_ZWRhZDY4ZGUtYmRlNS00OWZaLTlkZTgtZWRiYjIxOWI2NTQ4@thread.v2`
277
+
A Teams meeting link looks like this: `https://teams.microsoft.com/l/meetup-join/meeting_chat_thread_id/1606337455313?context=some_context_here`. The `threadID`is where `meeting_chat_thread_id` is in the link. Ensure that the `meeting_chat_thread_id` is unescaped before use. It should be in the following format: `19:meeting_ZWRhZDY4ZGUtYmRlNS00OWZaLTlkZTgtZWRiYjIxOWI2NTQ4@thread.v2`
278
278
279
279
280
280
## Run the code
281
281
282
282
Run the application.
283
283
284
-
To join the Teams meeting enter your Team's meeting link in the UI.
284
+
To join the Teams meeting, enter your Team's meeting link in the UI.
285
285
286
-
After you join the Team's meeting you will need to admit the user to the meeting in your Team's client. Once the user is admitted and has joined the chat you will be able to send and receive messages.
286
+
After you join the Team's meeting, you need to admit the user to the meeting in your Team's client. Once the user is admitted and has joined the chat, you are able to send and receive messages.
287
287
288
288
:::image type="content" source="../join-teams-meeting-chat-quickstart-ios.png" alt-text="Screenshot of the completed iOS Application.":::
0 commit comments