Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UnsignedSync type to accomadate for sync events #135

Merged
merged 4 commits into from
Jul 16, 2020

Conversation

DevinR528
Copy link
Member

@DevinR528 DevinR528 commented Jul 15, 2020

fixes #118

Copy link
Member

@jplatte jplatte left a comment

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>.

ruma-events-macros/src/event_enum.rs Outdated Show resolved Hide resolved
@jplatte
Copy link
Member

jplatte commented Jul 15, 2020

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
ruma-events/src/lib.rs Outdated Show resolved Hide resolved
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