fix(channels): sync monoforum suggested forwards and reactions
This commit is contained in:
parent
45a7e117ea
commit
fd47dd765a
17 changed files with 650 additions and 23 deletions
|
|
@ -516,6 +516,10 @@ func (s *ChannelStore) getChannelMessagesForMember(ctx context.Context, viewerUs
|
|||
AND id = ANY($2::int[])
|
||||
AND (NOT deleted OR ($4 > 0 AND id = $4))
|
||||
AND (($3 <= 0 OR id > $3) OR ($4 > 0 AND id = $4))`
|
||||
if channel.Monoforum && !member.CanManageDirectMessages() {
|
||||
args = append(args, string(domain.PeerTypeUser), viewerUserID)
|
||||
where += fmt.Sprintf("\nAND saved_peer_type = $%d AND saved_peer_id = $%d", len(args)-1, len(args))
|
||||
}
|
||||
rows, err := s.db.Query(ctx, `
|
||||
SELECT `+channelMessageColumns+`
|
||||
FROM channel_messages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue