Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

[federation] Implement state APIs #486

Merged
merged 3 commits into from
Jun 22, 2018
Merged

Conversation

APwhitehat
Copy link
Contributor

fixes #485.

Other TODOs (will create gh issues to track): Figure out how & when to use keyring to verify JSON requests.
event_auth can be implemented via the state apis, but is it too much of extra work ?

Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>

}

// getEvent returns the requested event.
// Or returns an error response which can be sent to the client.
Copy link
Member

Choose a reason for hiding this comment

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

"returns the requested event, otherwise it returns"

@@ -45,11 +61,13 @@ func GetEvent(
&authResponse,
)
if err != nil {
return util.ErrorResponse(err)
resErr := util.ErrorResponse(err)
Copy link
Member

Choose a reason for hiding this comment

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

These could also just be

return nil, &util.ErrorResponse(err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't believe it either. That is not allowed in go.

@erikjohnston
Copy link
Member

At some point we should make it so that /state_ids/ don't pull the actual events from the room server, but that is an optimisation that can happen later.

@APwhitehat APwhitehat merged commit 853e825 into matrix-org:master Jun 22, 2018
@APwhitehat APwhitehat deleted the state_api branch June 22, 2018 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[federation] Implement State API
3 participants