Эх сурвалжийг харах

Add check in sync space command and update changelog

Tulir Asokan 3 жил өмнө
parent
commit
8168d0efff
2 өөрчлөгдсөн 9 нэмэгдсэн , 0 устгасан
  1. 5 0
      CHANGELOG.md
  2. 4 0
      commands.go

+ 5 - 0
CHANGELOG.md

@@ -3,10 +3,15 @@
 * Added support for bridging incoming broadcast list messages.
 * Added support for bridging incoming broadcast list messages.
 * Added overrides for mime type -> file extension mapping as some OSes have
 * Added overrides for mime type -> file extension mapping as some OSes have
   very obscure extensions in their mime type database.
   very obscure extensions in their mime type database.
+* Added support for personal filtering spaces (started by [@HelderFSFerreira] and [@clmnin] in [#413]).
 * Fixed avatar remove events from WhatsApp being ignored.
 * Fixed avatar remove events from WhatsApp being ignored.
 * Fixed the bridge using the wrong Olm session if a client established a new
 * Fixed the bridge using the wrong Olm session if a client established a new
   one due to corruption.
   one due to corruption.
 
 
+[@HelderFSFerreira]: https://github.com/HelderFSFerreira
+[@clmnin]: https://github.com/clmnin
+[#413]: https://github.com/mautrix/whatsapp/pull/413
+
 # v0.2.2 (2021-12-16)
 # v0.2.2 (2021-12-16)
 
 
 **This release includes a fix for a moderate severity security issue that
 **This release includes a fix for a moderate severity security issue that

+ 4 - 0
commands.go

@@ -1102,6 +1102,10 @@ func (handler *CommandHandler) CommandSync(ce *CommandEvent) {
 		}
 		}
 	}
 	}
 	if space {
 	if space {
+		if !ce.Bridge.Config.Bridge.PersonalFilteringSpaces {
+			ce.Reply("Personal filtering spaces are not enabled on this instance of the bridge")
+			return
+		}
 		keys := ce.Bridge.DB.Portal.FindPrivateChatsNotInSpace(ce.User.JID)
 		keys := ce.Bridge.DB.Portal.FindPrivateChatsNotInSpace(ce.User.JID)
 		count := 0
 		count := 0
 		for _, key := range keys {
 		for _, key := range keys {