kubeshop / botkube

An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices

Home Page:https://botkube.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding user mentions in the command header for interactive responses

mszostok opened this issue · comments

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