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

[webapp plugin] Unable to get a callback when a message is updated #18320

Closed
aguinet opened this issue Aug 31, 2021 · 3 comments
Closed

[webapp plugin] Unable to get a callback when a message is updated #18320

aguinet opened this issue Aug 31, 2021 · 3 comments
Labels
Bug Report/Open Bug report/issue

Comments

@aguinet
Copy link

aguinet commented Aug 31, 2021

Disclamer: I'm not sure whether I should file this as a bug or feature request, but a discussion on the Mattermost toolkit channel suggested posting this here.

Summary

For a webapp plugin, it seems to be impossible to get a hook called when a message will be updated.

Steps to reproduce

Create a plugin that registers on registry.registerMessageWillBePostedHook. It works when a message is sent, but it isn't called when a message is updated.

Expected behavior

We use this for an end-to-end encryption plugin, and this issue makes it impossible to modify encrypted messages. I guess two behaviors can be expected:

  1. registerMessageWillBePostedHook is also called when messages are updated, with a flag somehow that says that this is while updating a message
  2. having a separate hook mechanism, like 'registerMessageWillBeUpdatedHook'

Observed behavior (that appears unintentional)

No callbacks can be called when a message is updated.

@amyblais
Copy link
Member

Opened a ticket: https://mattermost.atlassian.net/browse/MM-38274.

@amyblais amyblais added the Bug Report/Open Bug report/issue label Aug 31, 2021
@streamer45
Copy link
Contributor

@aguinet Just letting you know this has been merged today (in mattermost/mattermost-webapp#8849) so expect to have this available in future MM versions. I am going to close this now.

@aguinet
Copy link
Author

aguinet commented Sep 29, 2021

@streamer45 This is very nice & cool, thanks a lot! I am looking forward to see this in the next mattermost release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report/Open Bug report/issue
Projects
None yet
Development

No branches or pull requests

3 participants