From eb3595bd392a39de321897ef7f71577c68cc98a7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 10 Aug 2019 15:44:05 +0300 Subject: [PATCH] Add newly created portals to personal filtering community --- community.go | 2 +- portal.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/community.go b/community.go index c7d9608..bda8ee1 100644 --- a/community.go +++ b/community.go @@ -84,7 +84,7 @@ func (user *User) createCommunity() { } func (user *User) addPortalToCommunity(portal *Portal) bool { - if len(user.CommunityID) == 0 { + if len(user.CommunityID) == 0 || len(portal.MXID) == 0 { return false } bot := user.bridge.Bot diff --git a/portal.go b/portal.go index 9c559c1..d48f90e 100644 --- a/portal.go +++ b/portal.go @@ -758,6 +758,7 @@ func (portal *Portal) CreateMatrixRoom(user *User) error { _ = customPuppet.CustomIntent().EnsureJoined(portal.MXID) } } + user.addPortalToCommunity(portal) err = portal.FillInitialHistory(user) if err != nil { portal.log.Errorln("Failed to fill history:", err)