close
The Wayback Machine - https://web.archive.org/web/20201019062245/https://github.com/mattermost/mattermost-plugin-custom-attributes/issues/31
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

Custom attributes visible next to user's name #31

Open
unode opened this issue Mar 23, 2020 · 4 comments
Open

Custom attributes visible next to user's name #31

unode opened this issue Mar 23, 2020 · 4 comments

Comments

@unode
Copy link

@unode unode commented Mar 23, 2020

Hi everyone,

I'm looking for a mattermost plugin that allows decorating the user's name with arbitrary messages/symbols/emoji representing different status in the community.
If using emoji, these could be (moderators), 👍 (supporters), and so on.

The current plugin already provides most of the customization capabilities I'm after but I do not see any mention of the ability to display the information next to the user's name.
Note that by this I mean, shown next to the name on every message written by the user, not in the floating pop-up with the profile information.

Is this something that can be achieved with the current plugin and/or mattermost's customization capabilities?

Thanks

@marquiswang
Copy link

@marquiswang marquiswang commented Apr 22, 2020

In terms of spec, I propose the following change to the settings:

    "com.mattermost.custom-attributes": {
        "CustomAttributes": [
            {
                "Name": ":mattermost: [Core Committer](https://developers.mattermost.com/contribute/getting-started/core-committers/)",
                "UserIDs": ["someuserID1", "someuserID2"],
                "GroupIDs":["somegroupID1","somegroupID2"],
                "ShowBadge": true
            },
            {
                "Name": ":mattermost: Staff",
                "UserIDs": ["someuserID3", "someuserID4"],
                "GroupIDs":["somegroupID3","somegroupID4"]
            }
        ]
    }

where an attribute with ShowBadge = true is visible in all channels.

@marquiswang
Copy link

@marquiswang marquiswang commented Apr 22, 2020

I can help with a PR for this, but would need some pointers about the best way to implement this. I don't see an obvious option for setting post flair in the plugin registry (https://developers.mattermost.com/extend/plugins/webapp/reference/#registry)

Presumably it would make a lot of sense to hook into the code that generates the [BOT] badge for posts from the API.

@unode
Copy link
Author

@unode unode commented Apr 22, 2020

Instead of a boolean for ShowBadge, would it make more sense to have the variable hold the actual badge (e.g. "ShowBadge": ":star:") ?
This would allow customizing the icon or text to be shown.

Perhaps unnecessary but I would also consider "BadgeLocation" : "left|middle|right", to have the badge positioned in one of three locations: (left) FirstName (middle) LastName (right).

@moschlar
Copy link

@moschlar moschlar commented Oct 9, 2020

We're also interested in this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.