Initial desegregation of users and automatic config updating

This commit is contained in:
Tulir Asokan
2018-08-29 00:40:54 +03:00
parent 55c3ab2d4f
commit c7348f29b0
24 changed files with 806 additions and 475 deletions

View File

@ -48,7 +48,7 @@ type CommandEvent struct {
func (ce *CommandEvent) Reply(msg string) {
_, err := ce.Bot.SendNotice(string(ce.RoomID), msg)
if err != nil {
ce.Handler.log.Warnfln("Failed to reply to command from %s: %v", ce.User.ID, err)
ce.Handler.log.Warnfln("Failed to reply to command from %s: %v", ce.User.MXID, err)
}
}
@ -56,7 +56,7 @@ func (handler *CommandHandler) Handle(roomID types.MatrixRoomID, user *User, mes
args := strings.Split(message, " ")
cmd := strings.ToLower(args[0])
ce := &CommandEvent{
Bot: handler.bridge.AppService.BotIntent(),
Bot: handler.bridge.AS.BotIntent(),
Bridge: handler.bridge,
Handler: handler,
RoomID: roomID,