Skip to content

Custom data model to allow changing display name of call queues#3148

Merged
mgamis-msft merged 12 commits intomainfrom
mgamis/custom-data-model-to-change-display-name
Jun 13, 2023
Merged

Custom data model to allow changing display name of call queues#3148
mgamis-msft merged 12 commits intomainfrom
mgamis/custom-data-model-to-change-display-name

Conversation

@mgamis-msft
Copy link
Copy Markdown
Contributor

What

Custom data model to change display name of call queues

Why

https://skype.visualstudio.com/SPOOL/_workitems/edit/3248534

How Tested

Calling sample test
https://github.com/Azure/communication-ui-library/assets/79475487/3eb1c9a8-1bec-4a5b-9741-5001998aa104

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@mgamis-msft mgamis-msft requested review from a team as code owners June 5, 2023 22:19
@mgamis-msft mgamis-msft changed the title Custom data model to change display name of call queues Custom data model to allow changing display name of call queues Jun 5, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2023

CallWithChat bundle size is not changed.

  • Current size: 10604502
  • Base size: 10604502
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2023

Chat bundle size is not changed.

  • Current size: 10241432
  • Base size: 10241432
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2023

Calling bundle size is not changed.

  • Current size: 10184921
  • Base size: 10184921
  • Diff size: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2023

* 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;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that can be overridden for just normal users as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you can override the display name for any user based on the userId.
image

/* @conditional-compile-remove(teams-adhoc-call) */
const onFetchProfile = async (userId: string, defaultProfile?: Profile): Promise<Profile | undefined> => {
// TODO: Explore using Graph API to differentiate Call queues from other Voice app bots
if (userId.startsWith('28:orgid:')) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this always true? I believe all bots use this prefix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. This prefix is not exclusive to call queues. I have not quite figured out how to use Graph API to determine a resource account for a call queue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don is right, Bots use this prefix.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, bots use 28: prefix. The orgid is something different. 28:orgid could be specific to call queue as they would technically be the organizer of the meeting. Can we confirm if other bots can be organizers?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is a good point ^ I think if call queues are special and get the orgid moniker like users this might actually be good, is there someone on VoiceApps you can reach out to about this @mgamis-msft?

Copy link
Copy Markdown
Contributor Author

@mgamis-msft mgamis-msft Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 28: prefix is actually for resource accounts in Microsoft 365. Each resource account can be assigned to a call queue or an auto attendant. But the Graph API can't know which Voice App a resource account is assigned to.
image.
I will remove this code for our Calling sample but the point of this PR is now Contoso should be able to change the display name of their call queue if they know the resource account user id which they can do using Graph API.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2023

@mgamis-msft mgamis-msft force-pushed the mgamis/custom-data-model-to-change-display-name branch from 15bed05 to ba28b12 Compare June 7, 2023 19:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2023

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2023

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2023

@github-actions
Copy link
Copy Markdown
Contributor

@mgamis-msft mgamis-msft merged commit 439da51 into main Jun 13, 2023
@mgamis-msft mgamis-msft deleted the mgamis/custom-data-model-to-change-display-name branch June 13, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants