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

emoji: Handle conflict with system emojis #518

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kc9jud
Copy link

@kc9jud kc9jud commented Apr 24, 2024

Fixes #517.

Copy link
Owner

@maxbrunet maxbrunet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kc9jud 👋, thank you for reporting this and giving a shot at fixing it

Looks like there are blockers to properly fix it though, please see my comment below.

Once this is unblocked, if you are able to add a simple test attempting to create a dummy emoji with a conflicting name, that would be great

emoji_name=self._name, files={"image": image}
)
except InvalidOrMissingParameters as e:
if e.args and "Name conflicts with existing system emoji name" in e.args[0]:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message field is internationalized, so it depends on the selected language. We should check the error id instead, model.emoji.system_emoji_name.app_error in this case.

The driver does not exposed it:

https://github.com/Vaelor/python-mattermost-driver/blob/c6ac437d351c32ea7bf1eca39846a6482c51bd01/src/mattermostdriver/client.py#L151

I am not sure if it is still maintained, I have opened an issue to investigate replacing it: #541. So I think we might be blocked here until we change the driver and the new one exposes the error ID

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

Successfully merging this pull request may close these issues.

Name conflicts with existing system emoji name
2 participants