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

Support PUTing typing status in clientapi #550

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

APwhitehat
Copy link
Contributor

Commits can be easily reviewed incrementally, :)

  • Support PUT /rooms/{roomID}/typing/{userID}, add handler that passes it to clientapi/producers typingServerProducer
  • the producer talks with typing server (currently mock implementation) via internal API
  • Setup the typing server (mock)

Signed-off-by: Anant Prakash <[email protected]>


// InputTypingEventsRequest is a request to TypingServerInputAPI
type InputTypingEventsRequest struct {
InputTypingEvents []InputTypingEvent `json:"input_typing_events"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you want to input an array?
If one - but not all - requests are failing e.g. because of missing permissions for one request: How do you find out?
I think the easier way is to have one request per request. Where should the consolidating and separation happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so, 1st thing is that these EDUs are already permitted (have gone through auth).
And from an perspective of drawing out an API, it seemed short-sighted to support single event per API call.

P.S. I remembered now that we'll need to put multiple events at a time for federation :P

Copy link
Member

Choose a reason for hiding this comment

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

Given that we only currently send one typing event at a time I'd not use a slice for now. Its an internal API so we can change it down the road if we need it to handle multiple typing events :)

@@ -59,6 +59,7 @@ listen:
federation_api: "localhost:7772"
sync_api: "localhost:7773"
media_api: "localhost:7774"
Copy link
Member

Choose a reason for hiding this comment

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

/me wonders why the other components haven't been added here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tracking this via #558

@APwhitehat APwhitehat merged commit 38965ef into matrix-org:master Jul 24, 2018
@APwhitehat APwhitehat deleted the typing_server branch July 24, 2018 14:49
@APwhitehat APwhitehat added this to the Typing Server milestone Aug 4, 2018
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.

4 participants