From a7601fa4cc4b00de108660378130edf498b1b803 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 7 Jan 2020 21:25:27 +0200 Subject: [PATCH] Hide rooms when adding to personal filtering community --- community.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/community.go b/community.go index 97d1819..2a2376d 100644 --- a/community.go +++ b/community.go @@ -89,7 +89,11 @@ func (user *User) addPortalToCommunity(portal *Portal) bool { } bot := user.bridge.Bot url := bot.BuildURL("groups", user.CommunityID, "admin", "rooms", portal.MXID) - reqBody := map[string]interface{}{} + reqBody := map[string]map[string]string{ + "m.visibility": { + "type": "private", + }, + } _, err := bot.MakeRequest(http.MethodPut, url, &reqBody, nil) if err != nil { user.log.Warnfln("Failed to add %s to %s: %v", portal.MXID, user.CommunityID, err)