Skip to content

Add UnsignedSync type to accomadate for sync events#135

Merged
jplatte merged 4 commits into
ruma:masterfrom
DevinR528:unsigned-types
Jul 16, 2020
Merged

Add UnsignedSync type to accomadate for sync events#135
jplatte merged 4 commits into
ruma:masterfrom
DevinR528:unsigned-types

Conversation

@DevinR528

@DevinR528 DevinR528 commented Jul 15, 2020

Copy link
Copy Markdown
Member

fixes #118

@jplatte jplatte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this would probably work but really it doesn't make that much sense to have most of this for redaction events. If we're splitting it like this anyway, let's have Unsigned for non-redacted events (without redacted_because), RedactedUnsigned with just redacted_because and RedactedSyncUnsigned with just redacted_because but a different redaction event type. Makes sense?

EDIT: Alternatively, have just Unsigned and RedactedUnsigned, but the latter generic, e.g. RedactedSyncStateEvents unsigned would have the type RedactedUnsigned<SyncRedactionEvent>.

Comment thread ruma-events-macros/src/event_enum.rs Outdated
@jplatte

jplatte commented Jul 15, 2020

Copy link
Copy Markdown
Member

If you don't see any issues with what I wrote above, can you add fixes #118 to the PR description? :)

@DevinR528 DevinR528 changed the title Add UnsignedSync type to accomadate for sync events Add UnsignedSync type to accomadate for sync events fixes #118 Jul 15, 2020
These two new unsigned types only have a redacted_because field and the
Unsigned stuct's redacted_because field has been removed.
@jplatte jplatte changed the title Add UnsignedSync type to accomadate for sync events fixes #118 Add UnsignedSync type to accomadate for sync events Jul 15, 2020
Comment thread ruma-events/src/lib.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Create separate unsigned types for regular & redacted events

2 participants