Fix NeedsRelaybot check and relaybot command handling without arguments

This commit is contained in:
Tulir Asokan
2019-11-11 22:30:59 +02:00
parent 0f4048a178
commit 691d2ea1b3
3 changed files with 7 additions and 3 deletions

View File

@ -47,7 +47,7 @@ func (user *User) updateCommunityProfile() {
}
func (user *User) createCommunity() {
if !user.bridge.Config.Bridge.EnableCommunities() {
if user.IsRelaybot || !user.bridge.Config.Bridge.EnableCommunities() {
return
}
@ -84,7 +84,7 @@ func (user *User) createCommunity() {
}
func (user *User) addPortalToCommunity(portal *Portal) bool {
if len(user.CommunityID) == 0 || len(portal.MXID) == 0 {
if user.IsRelaybot || len(user.CommunityID) == 0 || len(portal.MXID) == 0 {
return false
}
bot := user.bridge.Bot