-
-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Hi
I need some help figuring out if and how this is possible.
I have a list of recursive messages.
Each message has an array of ids of groups of users that can read the message stored in a json-array.
I want a list of all the root-messages (with parent_id null) and their descendants (not as a tree) with a condition whereRaw(JSON_OVERLAPS...) for the readrights where the root, one of the descendants or both can be read.
It has to be possible to show a descendant without having the right to read the root. In the interface the root will be shown without content.
Each message can also be pinned.
On top of the rights I would also like to check or filter whether the root or one of the descendants is pinned.
The whole messagethread will then be pinned in the interface.
Can this be done somehow?