Skip to content

Commit 76afe72

Browse files
committed
attendee role
1 parent a42e0db commit 76afe72

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

Project/src/MakeCall/MakeCall.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export default class MakeCall extends React.Component {
3535
this.meetingId = null;
3636
this.passcode = null;
3737
this.presenterUserId = null;
38-
this.consumerUserId1 = null;
39-
this.consumerUserId2 = null;
38+
this.attendeeUserId = null;
39+
this.consumerUserId = null;
4040
this.threadId = null;
4141
this.messageId = null;
4242
this.organizerId = null;
@@ -374,7 +374,7 @@ export default class MakeCall extends React.Component {
374374

375375
createRoom = async () => {
376376
try {
377-
const roomId = await utils.createRoom(this.presenterUserId.value, this.consumerUserId1.value, this.consumerUserId2.value);
377+
const roomId = await utils.createRoom(this.presenterUserId.value, this.attendeeUserId.value, this.consumerUserId.value);
378378
console.log('Room id created: ', roomId);
379379
this.setState({ roomId });
380380
} catch (e) {
@@ -995,7 +995,7 @@ this.callAgent.on('incomingCall', async (args) => {
995995
className="mt-0"
996996
disabled={this.state.call || !this.state.loggedIn}
997997
label={`Enter an Identity to make a call to. You can specify multiple Identities to call by using \",\" separated values.`}
998-
placeholder="8:acs:<ACA resource ID>_<GUID>"
998+
placeholder="8:acs:<ACS resource ID>_<GUID>"
999999
componentRef={(val) => this.destinationUserIds = val} />
10001000
<TextField
10011001
disabled={this.state.call || !this.state.loggedIn}
@@ -1207,22 +1207,22 @@ this.callAgent.on('incomingCall', async (args) => {
12071207
<TextField className="mb-3 mt-0"
12081208
disabled={this.state.call || !this.state.loggedIn}
12091209
label="Presenter user id"
1210-
placeholder="8:acs:<ACA resource ID>_<GUID>"
1210+
placeholder="8:acs:<ACS resource ID>_<GUID>"
12111211
componentRef={(val) => this.presenterUserId = val} />
12121212
</div>
12131213
<div className="md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11">
12141214
<TextField className="mb-3 mt-0"
12151215
disabled={this.state.call || !this.state.loggedIn}
1216-
label="Consumer 1 user id"
1217-
placeholder="8:acs:<ACA resource ID>_<GUID>"
1218-
componentRef={(val) => this.consumerUserId1 = val} />
1216+
label="Attendee user id"
1217+
placeholder="8:acs:<ACS resource ID>_<GUID>"
1218+
componentRef={(val) => this.attendeeUserId = val} />
12191219
</div>
12201220
<div className="md-Grid-col ml-2 ms-sm11 ms-md11 ms-lg9 ms-xl9 ms-xxl11">
12211221
<TextField className="mb-3 mt-0"
12221222
disabled={this.state.call || !this.state.loggedIn}
1223-
label="Consumer 2 user id"
1224-
placeholder="8:acs:<ACA resource ID>_<GUID>"
1225-
componentRef={(val) => this.consumerUserId2 = val} />
1223+
label="Consumer user id"
1224+
placeholder="8:acs:<ACS resource ID>_<GUID>"
1225+
componentRef={(val) => this.consumerUserId = val} />
12261226
</div>
12271227
</div>
12281228
<PrimaryButton className="primary-button"

Project/src/Utils/Utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const utils = {
9797
}
9898
throw new Error('Failed to get Teams User Acccess token');
9999
},
100-
createRoom: async (presenterUserId, consumerUserId1, consumerUserId2) => {
100+
createRoom: async (presenterUserId, attendeeUserId, consumerUserId) => {
101101
try {
102102
const response = await axios({
103103
url: 'createRoom',
@@ -106,7 +106,7 @@ export const utils = {
106106
'Accept': 'application/json, text/plain, */*',
107107
'Content-type': 'application/json'
108108
},
109-
data: JSON.stringify({ presenterUserId, consumerUserId1, consumerUserId2 })
109+
data: JSON.stringify({ presenterUserId, attendeeUserId, consumerUserId })
110110
})
111111

112112
return response.data.roomId;

Project/webpack.config.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ module.exports = {
242242
id: { communicationUserId: req.body.presenterUserId },
243243
role: "Presenter"
244244
}) : null;
245-
req.body.consumerUserId1 ? participants.push({
246-
id: { communicationUserId: req.body.consumerUserId1 },
247-
role: "Consumer"
245+
req.body.attendeeUserId ? participants.push({
246+
id: { communicationUserId: req.body.attendeeUserId },
247+
role: "Attendee"
248248
}) : null;
249-
req.body.consumerUserId2 ? participants.push({
250-
id: { communicationUserId: req.body.consumerUserId2 },
249+
req.body.consumerUserId ? participants.push({
250+
id: { communicationUserId: req.body.consumerUserId },
251251
role: "Consumer"
252252
}) : null;
253253

@@ -258,6 +258,7 @@ module.exports = {
258258
return;
259259
}
260260

261+
console.log('participants:', participants);
261262
const validFrom = new Date(Date.now());
262263
const validUntil = new Date(validFrom.getTime() + 60 * 60 * 1000);
263264
const pstnDialOutEnabled = true;

0 commit comments

Comments
 (0)