This fixes panics that happen because the handlers assume the user is logged
in when the command is executed.
Example of a panic that happened:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x928d7c]
goroutine 127 [running]:
main.(*CommandHandler).CommandList(0xc0001783c0, 0xc00016bef8)
/build/commands.go:186 +0x6c
main.(*CommandHandler).Handle(0xc0001783c0, 0xc000455920, 0x1b,
0xc0002480c0, 0xc000250470, 0x4)
/build/commands.go:89 +0x1f3
main.(*MatrixHandler).HandleMessage(0xc000176db0, 0xc0001ae6c0)
/build/matrix.go:161 +0x203
created by maunium.net/go/mautrix-appservice.(*EventProcessor).Start
Because the Bridge Bot doesn't participate in the rooms it can't send any
messages to this room. Hence, we should send all replies to the management
room.
Having an import of all contacts on each startup and after login is very
annoying, if you have a big list of contacts. If you choose to not join a
room with all contacts, you get the invitation over and over on each
restart of the service. Better is to have a command for the management
room to explicitly start the import.
* Fix user ID reservation in registration
* Fix some database things
* Add commands
* Add basic contact syncing and portal creation
* Add better error logging