1 -- https://github.com/dessalines/lemmy/issues/197
4 -- Do the reply_view referencing the comment_mview
5 CREATE VIEW reply_view AS
9 c2.creator_id AS sender_id,
10 c.creator_id AS recipient_id
13 INNER JOIN comment c2 ON c.id = c2.parent_id
15 c2.creator_id != c.creator_id
16 -- Do union where post is null
20 c.creator_id AS sender_id,
21 p.creator_id AS recipient_id
27 AND c.parent_id IS NULL
28 AND c.creator_id != p.creator_id
32 closereply.recipient_id
37 closereply.id = cv.id;