Use ChatItemPolicy to handle edit state
Part of #2352 (closed)
Closes #415 (closed)
This MR extracts the canEdit
related logic to ChatItemPolicy
so it can be later reused for Thread message feed.
Testing strategy (only main message feed)
- Author of a message can edit the message (by pressing
⬆ key or by selecting Edit from the context menu) - User can't edit other user's message
- After 10 minutes, the message can't be edited
- Messages with
''
text ("deleted") can't be edited (neither with⬆ key nor from the context menu)
Edited by Tomas Vik (OOO back on 2024-08-12)