Skip to content

Commit 912ffd0

Browse files
Teams adhoc enabled for calling handlers (#2914)
* teams adhoc added to calling sample * Change files * Duplicate change files for beta release * allow startCall to teams users conditionally for beta * update change log comment * fix CI check failure error TS2532: Object is possibly 'undefined' * Added callout to show Teams user id format --------- Co-authored-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com>
1 parent 188eff4 commit 912ffd0

8 files changed

Lines changed: 170 additions & 34 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Teams adhoc call enabled for startCall handler",
4+
"packageName": "@azure/communication-react",
5+
"email": "79475487+mgamis-msft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Teams adhoc call enabled for startCall handler",
4+
"packageName": "@azure/communication-react",
5+
"email": "79475487+mgamis-msft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

common/config/rush/pnpm-lock.yaml

Lines changed: 15 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/config/rush/variants/stable/pnpm-lock.yaml

Lines changed: 50 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/calling-component-bindings/src/handlers/createHandlers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ export const createDefaultCallingHandlers = memoizeOne(
5050
...createDefaultCommonCallingHandlers(callClient, deviceManager, call),
5151
// FIXME: onStartCall API should use string, not the underlying SDK types.
5252
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined => {
53+
/* @conditional-compile-remove(teams-adhoc-call) */
54+
return callAgent?.startCall(participants, options);
5355
if (!isACSCallParticipants(participants)) {
5456
throw new Error('TeamsUserIdentifier in Teams call is not supported!');
5557
}
56-
return callAgent ? callAgent.startCall(participants, options) : undefined;
58+
return callAgent?.startCall(participants, options);
5759
},
5860
/* @conditional-compile-remove(PSTN-calls) */
5961
onAddParticipant: async (

samples/Calling/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@azure/logger": "1.0.3",
3434
"@babel/preset-react": "^7.12.7",
3535
"@fluentui/react": "~8.98.3",
36+
"@fluentui/react-hooks": "~8.6.12",
3637
"@fluentui/react-icons": "~2.0.194",
3738
"@internal/acs-ui-common": "1.5.1-beta.2",
3839
"@internal/calling-component-bindings": "1.5.1-beta.2",

samples/Calling/src/app/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ const App = (): JSX.Element => {
125125
/* @conditional-compile-remove(PSTN-calls) */
126126
callLocator = callLocator || getOutboundParticipants(callDetails.outboundParticipants);
127127

128+
/* @conditional-compile-remove(teams-adhoc-call) */
129+
callLocator = callLocator || getOutboundParticipants(callDetails.outboundTeamsUsers);
130+
128131
callLocator = callLocator || createGroupId();
129132

130133
/* @conditional-compile-remove(rooms) */

0 commit comments

Comments
 (0)