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 {
|
func (user *User) addPortalToCommunity(portal *Portal) bool {
|
||||||
if len(user.CommunityID) == 0 {
|
if len(user.CommunityID) == 0 || len(portal.MXID) == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
bot := user.bridge.Bot
|
bot := user.bridge.Bot
|
||||||
|
|
|
@ -758,6 +758,7 @@ func (portal *Portal) CreateMatrixRoom(user *User) error {
|
||||||
_ = customPuppet.CustomIntent().EnsureJoined(portal.MXID)
|
_ = customPuppet.CustomIntent().EnsureJoined(portal.MXID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
user.addPortalToCommunity(portal)
|
||||||
err = portal.FillInitialHistory(user)
|
err = portal.FillInitialHistory(user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
portal.log.Errorln("Failed to fill history:", err)
|
portal.log.Errorln("Failed to fill history:", err)
|
||||||
|
|
Loading…
Reference in a new issue