* Modify INSTALL.md and dendrite-config.yaml for the new appservice database
* Correct all instances of casing on 'application service' to align with
spec
* Store incoming events that an app service is interested in in the
database to be later read by transaction workers.
* Retrieve these events from transaction workers, one per AS.
* Minimal transaction ID data is stored as well to recover after
server failure.
* Send events to AS and exponentially backoff on failure.
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* Compile room and alias namespace regexs
We'll be needing these for event filtering in the appservice component.
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* App service filters roomserver events
Doing so based on namespace regexes that each app service has defined.
To get the aliases for a roomID a new aliasAPI endpoint was defined,
GetAliasesFromRoomID, which does exactly what it says on the tin.
Next step is to queue events to be sent off to each homeserver.
* Additionally filter state events for app services
* Fixed context, logging, derps, config handling
* Prevented user from creating more than one regex per namespace type
Got caught out by realizing I had an extra '-' in the config file. This
prevents anyone from making the same mistake :)
* Removed exclusive RoomID namespace regex, as we won't need to check
upon room creation if the ID is reserved exclusively by an AS (as this
is silly and horribly inefficient).
* Fixed all else mentioned
* Add Application Service component
The component subscribes to the Roomserver kafka stream, filtering
events to be eventually sent off to relevant app services, as well as
handling incoming HTTP traffic from app services on the
`/matrix/app/r0/*` route.
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* Make linting happy
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* Fix typo in API Endpoint
Signed-off-by: Andrew Morgan <andrewm@matrix.org>
* Fixed another typo and bug
Use a sql.NullInt64 instead of an Int64 as that allows for values to
sometimes be null when pulling from a postgres table. Can result in
error otherwise.
Signed-off-by: Andrew Morgan <andrewm@matrix.org>