Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MM-30000] Inconsistent behaviour in channel mentions in message attachments #16291

Open
larkox opened this issue Nov 17, 2020 · 5 comments
Open
Labels
Area/Toolkit Plugins and integrations framework Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted Tech/React Native Mobile app Up For Grabs

Comments

@larkox
Copy link
Contributor

larkox commented Nov 17, 2020

Summary

This ticket was originally filed on Jira: https://mattermost.atlassian.net/browse/MM-30000
When creating a channel mention link with fmt.Sprintf("~%s", channel.Name) in a message attachment, the behaviour is both inconsistent and buggy:

  • If the link is contained in the Title field, it does not render as a link on mobile.

Steps to reproduce

  1. Build a post such as
post := &model.Post{
	Message: message,
	Props: map[string]interface{}{
		"attachments": []*model.SlackAttachment{
			{
				Title: fmt.Sprintf("~%s", channel.Name),
				Text:    fmt.Sprintf("~%s", channel.Name),
				Pretext: fmt.Sprintf("~%s", channel.Name),
			},
		},
	},
}
  1. Send the post to a user.
  2. Read the post from the mobile app and test all three links.

Expected behavior

The link should in all cases redirect to the channel without a page refresh nor opening a different tab.

Possible fixes

For the mobile problem, probably the text is just not parsed through the Markdown parser.

@larkox larkox added Difficulty/1:Easy Easy ticket Up For Grabs Tech/React Native Mobile app Help Wanted Community help wanted labels Nov 17, 2020
@hanzei hanzei added the Area/Toolkit Plugins and integrations framework label Nov 17, 2020
@rafabelts
Copy link

Hi, I'd like to contribute, can you assign me the issue ?

@rafabelts
Copy link

rafabelts commented Oct 3, 2023

Hi @amyblais, I have a doubt, should I fork the web app repositorie or the mobile ?

@amyblais
Copy link
Member

amyblais commented Oct 3, 2023

I have a doubt, should I fork the web app repositorie or the mobile ?

My best guess is in the mobile repository, but I'll let @larkox confirm.

@larkox
Copy link
Contributor Author

larkox commented Oct 3, 2023

@rafabelts The original issue was for Mobile, but it would be awesome if you could confirm the behavior also on web and make sure both are consistent.

But for the sake of simplicity, let's start with the mobile fix, and we can continue from there 😄

@rafabelts
Copy link

Ok ok thanks!! 😁

@rafabelts rafabelts removed their assignment Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Toolkit Plugins and integrations framework Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted Tech/React Native Mobile app Up For Grabs
Projects
None yet
Development

No branches or pull requests

5 participants