Add database migrations and handle leaving private chat portals. Fixes #7
This commit is contained in:
4
user.go
4
user.go
@ -47,6 +47,10 @@ type User struct {
|
||||
}
|
||||
|
||||
func (bridge *Bridge) GetUserByMXID(userID types.MatrixUserID) *User {
|
||||
_, isPuppet := bridge.ParsePuppetMXID(userID)
|
||||
if isPuppet || userID == bridge.Bot.UserID {
|
||||
return nil
|
||||
}
|
||||
bridge.usersLock.Lock()
|
||||
defer bridge.usersLock.Unlock()
|
||||
user, ok := bridge.usersByMXID[userID]
|
||||
|
Reference in New Issue
Block a user