forked from MirrorHub/mautrix-whatsapp
Add newly created portals to personal filtering community
This commit is contained in:
parent
64e517da25
commit
eb3595bd39
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue