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

General/small improvements to the application service API specification #1533

Merged
merged 4 commits into from
Aug 20, 2018

Conversation

turt2live
Copy link
Member

Rendered: see 'docs' status check


Explicitly say how appservices should detect state events
Fixes #1014

Misc language changes

Clearly state how the users namespace relates to interest in events
Fixes #1307

@turt2live turt2live requested a review from a team August 17, 2018 19:41
@Half-Shot Half-Shot mentioned this pull request Aug 17, 2018
11 tasks
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm modulo some minor quibbles

@@ -32,6 +32,10 @@ paths:
description: |-
This API is called by the homeserver when it wants to push an event
(or batch of events) to the application service.

The application service should take care to ensure that it handles
Copy link
Member

Choose a reason for hiding this comment

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

s/handles/detects/

or 'Note that the application service should distinguish state events from message events via the presence of a state_key, rather than via the event type."

@@ -217,7 +224,8 @@ need to be able to adjust the ``origin_server_ts`` value to do this.

Inputs:
- Application service token (``as_token``)
- Desired timestamp
- Desired timestamp in milliseconds since the unix epoch
Copy link
Member

Choose a reason for hiding this comment

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

suggest using parens: "Desired timestamp (in milliseconds since the unix epoch)."

(Aside: should we just have a note in the introduction that all timestamps are in ms since the epoch, and then just use 'timestamp' throughout the rest of the spec?)

Copy link
Member Author

Choose a reason for hiding this comment

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

There's #1468 that kinda covers the case of "wtf is a timestamp". Putting it in the intro seems much better than going through the entire spec looking for "timestamp".

@@ -39,7 +40,7 @@ This version of the specification is generated from
Application Services
--------------------
Application services are passive and can only observe events from a given
homeserver. They can inject events into rooms they are participating in.
homeserver (HS). They can inject events into rooms they are participating in.
Copy link
Member

Choose a reason for hiding this comment

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

I'd kinda rather we just used 'homeserver' throughout. But I don't mind overmuch if you don't want to do that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd also rather "homeserver", however the diff becomes insane because "HS" is used everywhere, pushing the line length all out of whack. Kinda settled for this pending something to take out the acronyms from everywhere as one giant "fix the world" PR or something.

@turt2live turt2live merged commit 7ad22b2 into matrix-org:master Aug 20, 2018
@turt2live turt2live deleted the travis/as/general branch August 20, 2018 18:28
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.

2 participants