Skip to content

Commit a024ded

Browse files
committed
Added callback to call screen
1 parent c2feaa1 commit a024ded

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

samples/CallWithChat/src/app/views/CallScreen.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
CallWithChatCompositeOptions,
1313
onResolveDeepNoiseSuppressionDependencyLazy,
1414
onResolveVideoEffectDependencyLazy,
15+
Profile,
1516
toFlatCommunicationIdentifier,
1617
useAzureCommunicationCallWithChatAdapter
1718
} from '@azure/communication-react';
@@ -99,6 +100,17 @@ export const CallScreen = (props: CallScreenProps): JSX.Element => {
99100
laughReaction: { url: 'assets/reactions/laughEmoji.png', frameCount: 102 },
100101
applauseReaction: { url: 'assets/reactions/clapEmoji.png', frameCount: 102 },
101102
surprisedReaction: { url: 'assets/reactions/surprisedEmoji.png', frameCount: 102 }
103+
},
104+
onFetchProfile: async (userId: string, defaultProfile?: Profile): Promise<Profile | undefined> => {
105+
if (userId.includes('8:orgid:')) {
106+
return {
107+
displayName: 'Teams Agent'
108+
};
109+
}
110+
if (userId === '<28:orgid:Enter your teams app here>') {
111+
return { displayName: 'Teams app display name' };
112+
}
113+
return defaultProfile;
102114
}
103115
};
104116
}, []);

0 commit comments

Comments
 (0)