Commit Graph

23 Commits

Author SHA1 Message Date
projectmoon 66fb6e7cf8 Fix various issues with room events and related logic.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
- 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 bfc5609ab6 Add proper constraints to db tables. Report errors when listing users.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2021-05-16 21:39:19 +00:00
projectmoon cf9ce63892 Replace application-level database connectivity.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
- 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 30f800eb4a Relicense to AGPL, change project name.
continuous-integration/drone/push Build is running Details
2021-05-14 22:07:16 +00:00
projectmoon ba6a4c9679 Update matrix SDK to latest with Room enum 2.0
continuous-integration/drone/push Build is passing Details
2021-03-22 15:01:49 +00:00
projectmoon 85557c0382 Split handling of comand results from execution.
continuous-integration/drone/push Build is passing Details
2021-03-15 20:27:57 +00:00
projectmoon 8e4eb574d2 Update to latest matrix SDK and other dependencies.
continuous-integration/drone/push Build is passing Details
2021-03-15 20:10:42 +00:00
projectmoon 67291e6deb Switch to Duration::from_secs, because we don't need nanos.
continuous-integration/drone/push Build is passing Details
2021-02-10 20:30:17 +00:00
projectmoon d813198cb0 Reply with executed command as quote (single commands only).
continuous-integration/drone/push Build is passing Details
2021-02-09 22:22:09 +00:00
projectmoon 1b0003ff1b Upgrade to Matrix SDK latest (Store Rewrite) and Tokio 1.0
continuous-integration/drone/push Build is passing Details
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.
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is failing Details
2020-11-30 19:53:26 +00:00
projectmoon 7e1abab66d Resync command now uses record_room_information.
continuous-integration/drone/push Build is passing Details
2020-11-29 21:18:41 +00:00
projectmoon 118e4b00c7 Store room info when joining a room. 2020-11-29 17:06:04 +00:00
projectmoon 91cfc52e5b Change record_users_in_room to record_room_information.
continuous-integration/drone/push Build is passing Details
2020-11-29 14:02:40 +00:00
projectmoon 224f8cd0f1 Functions for storing RoomInfo in db. Refactor bot joins room event.
continuous-integration/drone/push Build is passing Details
Add get/insert functions for RoomInfo in the rooms db.

Move 'bot joins room' code to single method, so we can also record a
RoomInfo struct into the database.
2020-11-29 14:00:05 +00:00
projectmoon dda0d74f45 Implement resync command without filtering ourselves out.
continuous-integration/drone/push Build was killed Details
2020-11-22 21:30:24 +00:00
projectmoon f46b914239 Add matrix client to context. 2020-11-22 20:52:44 +00:00
projectmoon 9ed2a81dd3 Record all users in room when joining.
continuous-integration/drone/pr Build is failing Details
continuous-integration/drone/push Build is failing Details
2020-11-10 20:18:00 +00:00
projectmoon 0939feee84 Placeholder to record all user info when joining room
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2020-11-09 21:17:03 +00:00
projectmoon 9349dd5f00 Add event processing check to received messages.
Also rename the existing `should_process` function to be more clear,
given presence of another similarly named function:
should_process_message.
2020-11-09 21:16:20 +00:00
projectmoon 74d0b88e80 Add should process check to room member event 2020-11-09 21:16:07 +00:00
projectmoon d7aaed9e00 Implement room clearing, log to info for member updates. 2020-11-08 21:47:01 +00:00
projectmoon 51ba3e3f42 Record user join/leaves in rooms. Move event emitter to its own file. 2020-11-08 21:47:01 +00:00