diff --git a/cabal.project b/cabal.project index 238966b5d4..aa17a71e0b 100644 --- a/cabal.project +++ b/cabal.project @@ -12,7 +12,7 @@ constraints: zip +disable-bzip2 +disable-zstd source-repository-package type: git location: https://github.com/simplex-chat/simplexmq.git - tag: 2f7f3dd9a3313d9d5ef2c20a476ecb8b6ffd6ada + tag: 0ebaa833dcb4c24ea7c409c14c3831999be150c7 source-repository-package type: git diff --git a/scripts/nix/sha256map.nix b/scripts/nix/sha256map.nix index d7a9ba1b66..4a6d479ad0 100644 --- a/scripts/nix/sha256map.nix +++ b/scripts/nix/sha256map.nix @@ -1,5 +1,5 @@ { - "https://github.com/simplex-chat/simplexmq.git"."2f7f3dd9a3313d9d5ef2c20a476ecb8b6ffd6ada" = "0175l9l06xvk4fd5zjkj63ljjf7jpgbx9mvzls1bx2rbl55wlbcg"; + "https://github.com/simplex-chat/simplexmq.git"."0ebaa833dcb4c24ea7c409c14c3831999be150c7" = "0yl0zfmlwwynjsq7cj9l5gici7l398ilvi96wxgf5i3h5b8sygq3"; "https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38"; "https://github.com/simplex-chat/direct-sqlcipher.git"."f814ee68b16a9447fbb467ccc8f29bdd3546bfd9" = "1ql13f4kfwkbaq7nygkxgw84213i0zm7c1a8hwvramayxl38dq5d"; "https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl"; diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 9ea1bfdc32..4b066697c9 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -2227,7 +2227,7 @@ processChatCommand' vr = \case counts <- map (first decodeLatin1) <$> withAgent' getMsgCounts let allMsgs = foldl' (\(ts, ds) (_, (t, d)) -> (ts + t, ds + d)) (0, 0) counts pure CRAgentMsgCounts {msgCounts = ("all", allMsgs) : sortOn (Down . snd) (filter (\(_, (_, d)) -> d /= 0) counts)} - GetAgentSubs -> lift $ CRAgentSubs <$> withAgent' getAgentSubscriptions + GetAgentSubs diff -> withUser $ \User {userId} -> lift $ CRAgentSubs <$> withAgent' (\a -> getAgentSubscriptions a diff (Just userId)) -- CustomChatCommand is unsupported, it can be processed in preCmdHook -- in a modified CLI app or core - the hook should return Either ChatResponse ChatCommand CustomChatCommand _cmd -> withUser $ \user -> pure $ chatCmdError (Just user) "not supported" @@ -7348,7 +7348,7 @@ chatCommandP = "/debug event " *> (DebugEvent <$> jsonP), "/get stats" $> GetAgentStats, "/reset stats" $> ResetAgentStats, - "/get subs" $> GetAgentSubs, + "/get subs" *> (GetAgentSubs <$> (" diff" $> True <|> pure False)), "/get workers" $> GetAgentWorkers, "/get workers details" $> GetAgentWorkersDetails, "/get msgs" $> GetAgentMsgCounts, diff --git a/src/Simplex/Chat/Controller.hs b/src/Simplex/Chat/Controller.hs index 90a73b3100..396c7c049e 100644 --- a/src/Simplex/Chat/Controller.hs +++ b/src/Simplex/Chat/Controller.hs @@ -497,7 +497,7 @@ data ChatCommand | DebugEvent ChatResponse | GetAgentStats | ResetAgentStats - | GetAgentSubs + | GetAgentSubs {diffOnly :: Bool} | GetAgentWorkers | GetAgentWorkersDetails | GetAgentMsgCounts