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

Remove methods returning/using EventReference #383

Merged
merged 15 commits into from May 24, 2023
Merged

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented May 16, 2023

Also removes CacheCost which is now implemented in Dendrite.

@S7evinK S7evinK requested a review from kegsay May 16, 2023 13:38
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Patch coverage: 15.18% and project coverage change: +0.43 🎉

Comparison is base (3fddabe) 55.57% compared to head (66e7c64) 56.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   55.57%   56.01%   +0.43%     
==========================================
  Files          44       44              
  Lines        6409     6356      -53     
==========================================
- Hits         3562     3560       -2     
+ Misses       2510     2460      -50     
+ Partials      337      336       -1     
Impacted Files Coverage Δ
join.go 50.00% <ø> (ø)
event_builder.go 42.46% <4.08%> (-12.54%) ⬇️
eventcrypto.go 56.09% <20.00%> (ø)
handlejoin.go 73.25% <25.00%> (-0.76%) ⬇️
handleleave.go 87.75% <25.00%> (-5.58%) ⬇️
eventauth.go 55.33% <28.57%> (ø)
pdu.go 21.21% <50.00%> (ø)
event.go 49.31% <100.00%> (+7.19%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

event_builder.go Outdated
// Since gomatrixserverlib otherwise deals with EventReferences,
// take the event IDs out of these and replace the prev_events and
// auth_events with those new arrays.
switch prevEvents := eventStruct.PrevEvents.(type) {
case []string:
eventStruct.PrevEvents = prevEvents
case []EventReference:
case []eventReference:
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this? I thought EventFormatV2 == strings only, so this case should never be hit?

event_builder.go Outdated

// Base64FromEventID returns, if possible, the base64bytes representation
// of the given eventID. Returns an empty spec.Base64Bytes if an error occurs decoding.
func base64FromEventID(eventID string) spec.Base64Bytes {
Copy link
Member

Choose a reason for hiding this comment

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

Call this eventHashFromEventID as that is more accurate.

@S7evinK S7evinK merged commit 95ba6c6 into main May 24, 2023
4 of 7 checks passed
@S7evinK S7evinK deleted the s7evink/eventreference branch May 24, 2023 09:55
S7evinK added a commit to matrix-org/dendrite that referenced this pull request May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants