In the log some message show up with `/_matrix/client/r0/createRoom
code=403 wrapped=M_FORBIDDEN: Application service has not registered this
user`. This is caused by the handling of text messages coming from unknown
users:
mautrix-whatsapp/vendor/github.com/Rhymen/go-whatsapp/handler.go:106
mautrix-whatsapp/user.go:250
mautrix-whatsapp/portal.go:551
Hence, before creating a Matrix room, we must ensure the user for this
room exists.
When a request for GetProfilePicThumb fails, WhatsApp sends an JSON object
containing a status field: `{"status":404}`. In my tests, it did send the
codes 401 and 404 which might correspond to the HTTP status codes. At
least, we don't have data to update the avatar and should stop doing so.
When a request for GroupMetadata fails, WhatsApp sends an JSON object
containing a status field: `{"status":500}`. In my tests, it sends the
codes 401, 404 and 500 which might have the meaning of the HTTP status
codes. At least, we don't have data to update the portal and should stop
doing anything.
* Fix user ID reservation in registration
* Fix some database things
* Add commands
* Add basic contact syncing and portal creation
* Add better error logging