Skip to content

Adding user mentions in the command header for interactive responses #1331

@mszostok

Description

@mszostok

Description

When the user clicks a button, then the command is returned, but you don't know who triggered that. In Slack for that reason we append a mention in the command header:
284551507-c6efd885-a333-4d83-86ef-1dc084d5cb76

We should the same for Teams. We will need to for each mention added a dedicated entry under entities:

		content.MsTeams.Entities = []MSTeamsEntity{
			{
				Type: "mention",
				Text: "{mention},
				Mentioned: Mentioned{
					ID:   {userID},
					Name: {userName},
				},
			},
		}

Note You cannot have addtional entries that are not specified in the text.

More info: https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cconnector-html#mention-support-within-adaptive-cards

Current solution

At present, we include a plain text mention, which may pose an issue only if users share the same names

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions