Add onFetchProfile to teams adapter option#2680
Conversation
…re/communication-ui-sdk into jinan/onFetchProfile-adapter
Calling bundle size is increased❗.
|
CallWithChat bundle size is increased❗.
|
Chat bundle size is increased❗.
|
| /* @conditional-compile-remove(PSTN-calls) */ | ||
| alternateCallerId, | ||
| /* @conditional-compile-remove(rooms) */ | ||
| /* @conditional-compile-remove(teams-identity-support) */ |
There was a problem hiding this comment.
should this be dependent on both CC statements here?
There was a problem hiding this comment.
Nice catch, I was adding this for both adapter, but now it is only for teams one
There was a problem hiding this comment.
Hmm, interesting question, I looked at the code a bit, this dependency is like "this or that", so either code being available in stable then we should not remove this line anymore - current conditional compilation logic works for this part
Some other dependency is like "This and that", so we need both code to enable the line.
| * The onFetchProfile is fetch-and-forget one time action for each user, once a user profile is updated, the value will be cached | ||
| * and would not be updated again within the lifecycle of adapter. | ||
| */ | ||
| onFetchProfile?: OnFetchProfileCallback; |
There was a problem hiding this comment.
(not for this PR, just a thought)
Should we provide any way to know if the information was populated from the calling sdk already inside this callback?
E.g. I want to come along and only modify profiles were data doesn't already exist.
An alternative to this is in an example usage we pull out of the call remoteparticipants object by default and only do some fancy graph fetch if its undefined and a teams user
There was a problem hiding this comment.
That's a good point, we can do (id: string, displayName?: string) => Profile for this case
Let's check this in for beta release first, then I will open a new PR to add this one
…re/communication-ui-sdk into jinan/onFetchProfile-adapter
* Add onFetchProfile to teams adapter --------- Co-authored-by: Nan Jiang <jinan@microsoft.com>
What
Add onFetchProfile to teams adapter option
Code sample:
Result:
Why
How Tested
Process & policy checklist
Is this a breaking change?