Hide rooms when adding to personal filtering community
This commit is contained in:
parent
e4ddc43007
commit
a7601fa4cc
@ -89,7 +89,11 @@ func (user *User) addPortalToCommunity(portal *Portal) bool {
|
|||||||
}
|
}
|
||||||
bot := user.bridge.Bot
|
bot := user.bridge.Bot
|
||||||
url := bot.BuildURL("groups", user.CommunityID, "admin", "rooms", portal.MXID)
|
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)
|
_, err := bot.MakeRequest(http.MethodPut, url, &reqBody, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
user.log.Warnfln("Failed to add %s to %s: %v", portal.MXID, user.CommunityID, err)
|
user.log.Warnfln("Failed to add %s to %s: %v", portal.MXID, user.CommunityID, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user