Commit Graph

63 Commits

Author SHA1 Message Date
Damir Jelić 321e56cff8 fix(examples): Listen to the done event in the emoji verification example
Nowadays all verifications send a done event, so this is the safer
option.
2022-09-05 15:54:45 +02:00
Damir Jelić a640312503 feat(crypto): Add method to format emojis
This patch adds a method to format a list of emojis in a a terminal
friendly way.

This method was borrowed from weechat-matrix but it's also quite useful
in our own emoji verification example.
2022-09-05 15:54:45 +02:00
Damir Jelić b2452ae92c feat(examples): Add a verbosity flag to the emoji example
Since this example prints out messages to stdout, it becomes quite hard
to see when we ask for user input if all the logging is going on.

This patch adds a standard verbosity flag which disables all logging by
default.
2022-09-05 15:54:45 +02:00
Damir Jelić faf0ce5007 chore(examples): Remove some empty useless attributes 2022-09-02 14:54:33 +02:00
Damir Jelić c5e6178b70 refactor(examples): Add proxy support to the emoji verification example 2022-09-02 14:54:33 +02:00
Benjamin Kampmann 0079f1d569 Merge pull request #977 from zecakeh/fix-examples-autojoin
fix(examples): Fix examples that accept invites
2022-09-02 11:14:40 +02:00
Jonas Platte e4267cc4fd refactor(sdk)! Make upload take &[u8] instead of impl Read
The use of `io::Read` wasn't helping since we had to buffer the whole
file in memory anyways, and we are unlikely to get around that in the
near future.
2022-09-01 13:40:47 +02:00
Ivan Enderlin 193da88320 feat(crypto): Rename verified and deleted to is_*
feat(crypto): Rename `verified` and `deleted` to `is_*`
2022-09-01 10:50:05 +02:00
Damir Jelić 16d9ed230a chore(examples): Use automatic links for some URLs 2022-08-31 18:43:47 +02:00
Ivan Enderlin 2e74983c79 chore: Fix other is_verified. 2022-08-31 17:16:05 +02:00
Damir Jelić 01f8ed10aa feat(examples): Add an example that lets you create rooms 2022-08-31 11:51:50 +02:00
Kévin Commaille dc39c8d96b fix(examples): Fix examples that accept invites
Spawn a task for accepting the invite otherwise the call never returns and sync stops.
2022-08-26 18:15:56 +02:00
Jonas Platte 4be2f3aa04 chore: Upgrade ruma 2022-08-25 18:09:13 +02:00
Jonas Platte 0b8462423a chore: Reduce indirect dependencies of examples 2022-08-23 18:30:44 +02:00
Chris Guida 2beb13cc3e update instructions for wasm_command_bot example 2022-08-15 17:56:54 -05:00
Damir Jelić 06e096f6cc fix(examples): Fix the in-room emoji verification example 2022-08-09 14:04:11 +02:00
Jonas Platte 3b03ad804f refactor(sdk)!: Swap the async lock around event handlers for a sync one 2022-08-05 16:16:41 +02:00
Jonas Platte dfec17e6af chore: Disable testing of crates without tests
This reduces the amount of "running 0 tests" spam when testing the whole
workspace and makes testing a little faster overall.
2022-08-05 11:10:31 +02:00
Benjamin Kampmann c4c7c2bb23 docs: remove unused import and fix style of custom events example 2022-08-04 15:02:39 +02:00
Benjamin Kampmann efc0556124 doc: follow naming convention and use generated types from ruma 2022-08-04 13:31:16 +02:00
Benjamin Kampmann 9d588f7e00 doc: add example for sending and reacting on custom events 2022-08-04 13:13:48 +02:00
Benjamin Kampmann fe4bc0dc75 doc: fix docs of getting started bot 2022-08-03 17:07:59 +02:00
Benjamin Kampmann ccbd9e5712 chore: rename Readme.md to README.md 2022-08-03 16:39:14 +02:00
Benjamin Kampmann 9538596fbb doc: Add getting-started example autojoin & command bot with plenty of source docs 2022-08-03 13:05:25 +02:00
Benjamin Kampmann 35be128139 docs: add Readme to examples root 2022-08-03 12:06:50 +02:00
Benjamin Kampmann 4c7ddd7512 refactor: move examples from crates/matrix-sdk into separate crates in examples/ 2022-08-02 15:06:04 +02:00
Damir Jelić 5fef444d61 matrix-sdk: Split out the crypto part of the sdk into a separate crate. 2020-04-29 09:48:00 +02:00
Damir Jelić 1de791c207 rust-sdk: Update to the latest ruma releases. 2020-04-23 10:52:47 +02:00
Devin R 9b52b58fea command_bot: pass sync_token to sync_forever 2020-04-15 09:54:53 -04:00
Devin R 63368a9437 command_bot: remove timestamp 2020-04-15 08:44:29 -04:00
Devin R c495a50c52 async_client: make pub API take &self instead of &mut, use read where possible 2020-04-15 08:29:34 -04:00
Devin R 3f9243a326 command-bot: add comments, use timestamp to filter old messages 2020-04-15 07:52:29 -04:00
Devin R 49e962e9c4 event_emitter: use Arc<RwLock<Room for EventEmitter and joined_rooms HashMap 2020-04-15 06:58:25 -04:00
Devin R 6d1cbcd9ca remove runtime and clean up example 2020-04-14 18:14:14 -04:00
Devin R cf029b2e4f make EventEmitter shared refs, in AsyncClient::sync lock only in inner most scope 2020-04-14 18:10:10 -04:00
Devin R a5ab7d97da use AsyncClient::sync_forever 2020-04-14 15:16:20 -04:00
Devin R 87c9dbdad7 clone client 2020-04-14 14:49:29 -04:00
Devin R 6f2b5194d1 remove unused imports/vars 2020-04-14 08:45:40 -04:00
Devin R 5f2269f12f party bot example responds to !party 2020-04-14 08:39:51 -04:00
Devin R c2b3210cc9 cargo fmt/clippy, move power levels into Room 2020-04-05 12:41:00 -04:00
Devin R e987a9006b remove User and merge fields into RoomMember 2020-04-05 08:34:02 -04:00
Devin R 4ac9153be1 use RoomId and UserId over string, use setter method names in Room 2020-04-03 09:07:40 -04:00
Devin R 187734f449 add test and docs for EventEmitter, fix review issues 2020-04-02 15:59:13 -04:00
Devin R 2ed152708c use inner event type for EventEmitter methods 2020-04-01 16:36:20 -04:00
Devin R 5c418f3420 cargo fmt/clippy 2020-04-01 16:36:20 -04:00
Devin R f2b50677b9 fix example, use tokio::Mutex for all types that could be passed
in async thread spawn envs
2020-04-01 16:36:17 -04:00
Devin R 5612825762 add EventEmitter trait, clean up imports so new warnings are easier to see 2020-04-01 16:35:50 -04:00
Devin R 9ee8a2d011 merged add-events, fix a few type changes and merge fails 2020-03-28 08:58:02 -04:00
Devin R b1027796c8 Merge branch 'add-events' into room-name 2020-03-28 08:36:30 -04:00
Devin R 090600e6aa restructure folders, add User, fill out RoomMember, handle prescence. 2020-03-28 06:58:30 -04:00