Dont setup topic as it resets the discovery filter
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
2ab1dcb54a
commit
14e887160a
|
@ -522,7 +522,9 @@
|
|||
:members-joined (:members-joined new-group)
|
||||
:contacts (:contacts new-group)})
|
||||
(add-system-messages chat-id previous-chat new-group)
|
||||
(set-up-topic chat-id previous-chat)
|
||||
|
||||
(when config/group-chats-publish-to-topic?
|
||||
(set-up-topic chat-id previous-chat))
|
||||
#(when (and message
|
||||
;; don't allow anything but group messages
|
||||
(instance? protocol/Message message)
|
||||
|
|
|
@ -170,6 +170,7 @@
|
|||
(map (comp :text :content) (sort-by :clock-value (vals (:messages actual-chat))))))))))))
|
||||
|
||||
(deftest set-up-topic
|
||||
(with-redefs [config/group-chats-publish-to-topic? true]
|
||||
(let [cofx {:now 0 :db {:account/account {:public-key admin}}}]
|
||||
(testing "a brand new chat"
|
||||
(let [actual (group-chats/handle-membership-update cofx initial-message "payload" admin)]
|
||||
|
@ -196,7 +197,7 @@
|
|||
:member member-1}]}]}
|
||||
actual (group-chats/handle-membership-update cofx new-message "payload" admin)]
|
||||
(testing "it removes the topic"
|
||||
(is (:shh/remove-filters actual)))))))
|
||||
(is (:shh/remove-filters actual))))))))
|
||||
|
||||
(deftest build-group-test
|
||||
(testing "only adds"
|
||||
|
|
Loading…
Reference in New Issue