-
Notifications
You must be signed in to change notification settings - Fork 379
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
Changes from 3 commits
5b5b4cf
fd101b6
7caad61
c8ba2e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.. Copyright 2016 OpenMarket Ltd | ||
.. Copyright 2018 New Vector Ltd | ||
.. | ||
.. Licensed under the Apache License, Version 2.0 (the "License"); | ||
.. you may not use this file except in compliance with the License. | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
They cannot prevent events from being sent, nor can they modify the content of | ||
the event being sent. In order to observe events from a homeserver, the | ||
homeserver needs to be configured to pass certain types of traffic to the | ||
|
@@ -68,7 +69,13 @@ Registration | |
Application services register "namespaces" of user IDs, room aliases and room IDs. | ||
These namespaces are represented as regular expressions. An application service | ||
is said to be "interested" in a given event if one of the IDs in the event match | ||
the regular expression provided by the application service. An application | ||
the regular expression provided by the application service, such as the room having | ||
an alias or ID in the relevant namespaces. Similarly, the application service is | ||
said to be interested in a given event if one of the application service's namespaced | ||
users is the target of the event, or is a joined member of the room where the event | ||
occurred. | ||
|
||
An application | ||
service can also state whether they should be the only ones who | ||
can manage a specified namespace. This is referred to as an "exclusive" | ||
namespace. An exclusive namespace prevents humans and other application | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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". |
||
|
||
Notes: | ||
- This will only apply when sending events. | ||
|
||
|
There was a problem hiding this comment.
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."