Revert " Remove event_enum! and only use event_content_enum"#68
Conversation
This reverts commit 2a91dc1.
Move EventDeHelper and from_raw_json_value to lib make pub so event_enum! macro can use them and test. to_camel_case returns a syn::Result.
| pub type AnyMessageEvent = MessageEvent<AnyMessageEventContent>; | ||
|
|
||
| /// Any message event stub (message event without a `room_id`, as returned in `/sync` responses) | ||
| pub type AnyMessageEventStub = MessageEventStub<AnyMessageEventContent>; |
There was a problem hiding this comment.
Ah, I guess we do need the marker trait implementations... For now.
There was a problem hiding this comment.
Are we planning on removing the Any*EventContent enums? An event that has a prev_content is still possible right?
There was a problem hiding this comment.
The Any*EventContent enums are needed when sending events. I don't think they're needed as the C in GenericEvent<C> though.
| } | ||
|
|
||
| #[test] | ||
| fn deserialize_member_event_membership_hoist_unsigned_prev_content() { |
There was a problem hiding this comment.
Side question (maybe unclear to me bc. English is not my first language): What does 'hoist' mean here?
There was a problem hiding this comment.
Instead of membership being in the content field it's at the top-level, "lifted" out.
Would deserialize_member_event_with_top_level_membership_field be better since the prev_content part isn't actually important to why it was failing?
Clean up imports and test names for state_event
No description provided.