mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-14 09:20:28 +00:00
chat: cross-reference groupInfoQueryFields and getGroupAndMember_
Two helpers redundantly maintain the same g.* column list. A future g.* addition must be applied to both sites; the cross-reference comments flag this for maintainers. A proper refactor (reusing groupInfoQueryFields from Connections.hs's inline SELECT) is out of scope for this branch.
This commit is contained in:
@@ -134,6 +134,7 @@ getConnectionEntity db vr user@User {userId, userContactId} agentConnId = do
|
||||
gm <-
|
||||
ExceptT $
|
||||
firstRow (toGroupAndMember c) (SEInternalError "referenced group member not found") $
|
||||
-- Mirrors Store/Shared.hs groupInfoQueryFields — keep column lists in sync.
|
||||
DB.query
|
||||
db
|
||||
[sql|
|
||||
|
||||
@@ -782,6 +782,7 @@ toBusinessChatInfo _ = Nothing
|
||||
groupInfoQuery :: Query
|
||||
groupInfoQuery = groupInfoQueryFields <> " " <> groupInfoQueryFrom
|
||||
|
||||
-- Mirrored in Store/Connections.hs getGroupAndMember_ — keep column lists in sync.
|
||||
groupInfoQueryFields :: Query
|
||||
groupInfoQueryFields =
|
||||
[sql|
|
||||
|
||||
Reference in New Issue
Block a user