mattermost-community / mattermost-plugin-custom-attributes

Mattermost plugin for adding custom attributes to users!
Apache License 2.0
46 stars 23 forks source link

Use this.props.fromWebhook to hide custom-attributes #72

Closed nathanaelhoun closed 2 years ago

nathanaelhoun commented 3 years ago

Summary

From a real user From a non-overwritten username From an overwritten username
image image image

Ticket Link

Fixes #37

mattermod commented 3 years ago

Hello @nathanaelhoun,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

mattermod commented 3 years ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

/cc @jasonblais @jfrerich @emilyacook

dipak-demansol commented 2 years ago

@nathanaelhoun can you pls explain me How to set the fromWebhook true?

nathanaelhoun commented 2 years ago

can you pls explain me How to set the fromWebhook true?

Hi @dipak-demansol, this property will be passed by the webapp once https://github.com/mattermost/mattermost-webapp/pull/9070 will get merged. I haven't found another reliable way for the plugin-side to detect if the post is from a webhook or not.

hanzei commented 2 years ago

@nathanaelhoun One final question before merging this change: If these changes are run against a server who doesn't have the require webapp change, is the plugin still functional?

nathanaelhoun commented 2 years ago

@hanzei Yes it is! As stated in the PR description, if the server doesn't have the changes, the plugin gracefully degrade as fromWebhook will be undefined (therefore falsy), and the plugin will behave like before.