Commit Graph

12 Commits

Author SHA1 Message Date
projectmoon 495df13fe6 Do not automatically create accounts; use enum to show this instead.
Instead of automatically creating a user account entry for any user
executing a command, we use an Account enum which covers both
registered and "transient" unregistered users. If a user registers,
the context has the actual user instance available, with state and
everything. If a user is unregistered, then the account is considered
transient for the request, with only the username available.
2021-05-26 14:20:18 +00:00
projectmoon 395753e8a9 Remove room state mgmt; let matrix SDK do it on-demand instead.
Fixes #71.

Fixes #20.
2021-05-24 21:45:51 +00:00
projectmoon ca34841d86 Functional user account registration. 2021-05-22 14:52:32 +00:00
projectmoon 5643677627 Consolidate dice and variable parsers under parser module. 2021-05-21 14:44:03 +00:00
projectmoon 3d5cda39c8 Consolidate dice module into logic module. 2021-05-21 14:26:58 +00:00
projectmoon 059538b95d Remove remaining warnings. 2021-05-21 14:14:03 +00:00
projectmoon 4de273db4a Remove sled code; promote sql to top level 2021-05-21 14:05:25 +00:00
projectmoon a665293268 Fix recording of room users, better logging.
- Fix constraint violations when recording users in rooms (migration fix).
 - Switched to tracing_subscriber to get log events from matrix SDK.
 - Remove "Applying migration" messages, and rely on refinery to log instead.
 - Log when an outgoing error is encountered.
2021-05-17 23:12:27 +00:00
projectmoon bfc5609ab6 Add proper constraints to db tables. Report errors when listing users. 2021-05-16 21:39:19 +00:00
projectmoon cf9ce63892 Replace application-level database connectivity.
- Some database methods not yet implemented.
 - Unit tests create temp files that are not cleaned up (but they should be).
2021-05-15 23:45:30 +00:00
projectmoon 1b0003ff1b Upgrade to Matrix SDK latest (Store Rewrite) and Tokio 1.0
This upgrade introduces a handful of breaking changes in the Rust
Matrix SDK.
 - Some types have disappeared and changed name.
 - Some functions are no longer async.
 - Room display name now has a Result type instead of just returning
   the value.
 - Client state store has breaking changes (not really a big deal).

This required introduction of a new type to store room information
that we are interested in on the context struct. This new RoomContext
is required mostly due to unit tests, because it is no longer possible
to instantiate the Room type in the Matrix SDK.
2021-01-30 12:54:47 +00:00
projectmoon e177da9c25 Centralize record_room_information function. 2020-11-30 19:53:26 +00:00