Commit Graph

21 Commits

Author SHA1 Message Date
projectmoon 97be5d5ccb Add migration to remove room state management tables. 2021-05-24 22:10:41 +00:00
projectmoon 76214bc790 Add an account deletion command. 2021-05-22 23:12:17 +00:00
projectmoon 8c2a90e86b Tests for secure commands and user DB API. 2021-05-22 22:48:47 +00:00
projectmoon ca34841d86 Functional user account registration. 2021-05-22 14:52:32 +00:00
projectmoon c1ec7366e4 Add user accounts, registration command, secure command valiation. 2021-05-22 14:01:16 +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 5630b4ed20 Add sled migration utility. 2021-05-20 15:30:44 +00:00
projectmoon a3b39ee42c Use ON CONFLICT and transactions where appropriate. 2021-05-19 21:34:11 +00:00
projectmoon 7eee16961e Add tests for dbstate. 2021-05-19 21:16:39 +00:00
projectmoon 43d8f9574f Allow 'upserts' in insert_room_info. Add a few more room db tests. 2021-05-19 21:06:28 +00:00
projectmoon 1c4cd3d139 Add tests for rooms db API 2021-05-18 22:15:03 +00:00
projectmoon d1c04b8817 Tests for all of the variables DB api. 2021-05-18 21:39:48 +00:00
projectmoon 5e899cd962 Return key not found error if value not found for user. 2021-05-18 15:37:20 +00:00
projectmoon 257f3a066c Some user variable tests. 2021-05-18 15:17:30 +00:00
projectmoon e539dcac1f Move migrations to sqlite directory. Remove in-memory temp db until refinery supports sqlx. 2021-05-18 14:50:49 +00:00
projectmoon 9f97a6cb43 Implement variable count; fix listing all variables returning values for all users. 2021-05-18 14:27:15 +00:00
projectmoon 66fb6e7cf8 Fix various issues with room events and related logic.
- Processing events multiple times when re-joining rooms.
 - Always thinking we've not processed an event/constraint
   violations (arguments were reversed in record_event).
 - Not handling errors when fetchin users in a room, and instead
   just suppressing them. Now, we handle errors!
 - Also update dependencies (attempt to fix ID too big bug, but no
   fix).
2021-05-16 22:24:27 +00:00
projectmoon 9798821b7b Implement room and dbstate for sqlite. 2021-05-16 14:29:57 +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 6b6e59da2e Initial SQLx implementation (variables). not yet wired up to bot.
- Adds migrations for the necessary tables.
 - Implements the user variables database functions.
 - Adds sqlx metadata for 'offline' use so we can build without a database.
2021-05-15 15:27:40 +00:00