20 Commits

Author SHA1 Message Date
Kévin Commaille
19e849a82a
docs: Document uses of the unstable-pre-spec feature flag 2021-04-12 11:31:01 +02:00
Damir Jelić
3216edc137
ruma-events: Add support for m.key.verification.done events 2020-12-04 19:53:46 +01:00
Damir Jelić
ce2ab39d71
ruma-events: Add support for m.key.verification.ready events 2020-12-04 19:53:46 +01:00
Damir Jelić
4afafa8b37
ruma-events: Add the majority of in-room verification events
This patch adds equivalent in-room versions of the m.key.verfication.*
events we have for to-device events.

The MSC that adds this is found over here:
https://github.com/matrix-org/matrix-doc/pull/2241
2020-12-04 19:53:43 +01:00
Jonas Platte
c322bd4d1e
events: Feature-gate reactions
and make relationships module public. The re-export idea doesn't make
sense with annotations being used in both reactions and messages.
2020-11-24 03:25:02 +01:00
Damir Jelić
71a8d9d6ce events: Add support for the m.reaction event type 2020-11-10 13:30:52 +01:00
Jonas Platte
d476046443
Disable clippy::large_enum_variant lint on event enums 2020-11-02 00:29:47 +01:00
Jonas Platte
e1975c2035
Be more consistent about whitespace 2020-10-24 00:44:01 +02:00
q-b
524782e992
Add moderation policy events 2020-10-09 13:29:11 +02:00
Devin R
204a90ac43 Rename *EventStub -> Sync*Event 2020-07-14 13:44:39 -04:00
Ragotzy.devin
1db4898cde
Refactor the input parsing of event_enums! 2020-07-13 15:31:15 +02:00
Ragotzy.devin
5e428ac95a
Add support for redacted events
* Generate redacted event enums and implement corresponding event structs
* Enable the *EventContent derives to generate redacted events

  Most redacted event code is now generated by the *EventContent derive
  macro. The exception are any content structs with the custom_redaction
  attribute. This leaves implementing up to the user.
* Add redact method to Redaction/CustomEventContent
* Add accessor methods for redacted event enums
* Add RedactedEventContent trait and super traits to match EventContent
2020-07-11 14:59:36 +02:00
Devin R
2b6eba69dd Add membership_change method to stub and stripped event
Fix redaction event detection in event_enum! macro. Add encrypted event
to AnyMessageEvent enum.
2020-06-24 02:11:28 +02:00
Ragotzy.devin
fdf87a38a2
Generate stub/stripped Any*Event enums in event_enum! macro
* Conditionally emit tokens for content enum in event_enum! and the path
  for each Any*Event variant contents.
* Add tests for redaction events now that they are part of Any*Event enums.
* Fix any tests that used Any*EventContent.
2020-06-23 22:33:37 +02:00
Ragotzy.devin
184aafa5f6
Revert " Remove event_enum! and only use event_content_enum"
This reverts commit 2a91dc1eb7215a762bd2204bc103ef172258d2d9. Also

* Add back type defs and Any*Event enums
* Move EventDeHelper and from_raw_json_value to lib make pub so event_enum! macro can use them and test. 
* Fix Any*Event enum deserialization error
* Remove event_content_enum! macro and ruma-events-macros/src/content_enum.rs
* Use serde's IgnoreAny to skip Unknown field's value
* Clean up imports and test names for state_event
2020-06-19 11:36:53 +02:00
Jonas Platte
d78cd2ed15
Fix deserializing event enums from serde_json::Value
(or anything else that's not a JSON string)
2020-06-16 02:12:13 +02:00
Jonas Platte
f2f283c965
Optimize event enum deserialization
Criterion reports ~25% improved performance
2020-06-16 00:29:05 +02:00
Ragotzy.devin
0381190bdb
Add is_compatible method to event content enums to fix Any*Event deserialization
… and add some benchmarks for it
2020-06-15 23:59:31 +02:00
Ragotzy.devin
be0838e7d3
Change EncryptedEventContent from StateEventContent to MessageEventContent
… and add it to AnyMessageEventContent
2020-06-11 23:48:57 +02:00
Jonas Platte
f304c04d1d Add 'ruma-events/' from commit '00692d532e26f58d48ead9589dc823403c6e59a5'
git-subtree-dir: ruma-events
git-subtree-mainline: d59a616e2c363507a89c92f34aa67e86ee2cfb49
git-subtree-split: 00692d532e26f58d48ead9589dc823403c6e59a5
2020-06-10 22:07:24 +02:00