HomePhabricator
Diffusion Comm 9c2d2d890656

[lib] Checking if the user can edit the message

Description

[lib] Checking if the user can edit the message

Summary: Added function to check whether the user can edit the specific message. It will be used later in deciding whether to show or not the edit button to the user.

Test Plan:
Temporarily added an 'Edit' button to the messages which the user can edit.

  • Checked if the user can edit his messages
  • Checked if the user can't edit other's messages
  • Checked if the user can't edit his messages without EDIT_MESSAGE permission.

Reviewers: michal, inka, ginsu

Reviewed By: michal

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7142