Commit graph

29 commits

Author SHA1 Message Date
Andrew Morgan 609646c19b
Implement GET /rooms/{roomAlias} (#494)
* Query whether a room alias exists on app services

Signed-off-by: Andrew Morgan <andrewm@matrix.org>

* URL encode room alias before sending to AS

* Add /room/ to path

* Query AS /alias/ API at a lower level

* Don't verify self-signed AS certificates

* Don't skip cert validation on appservices, fix logging

* Separate req.WithContext

* Linting

* Do not warn when an AS room alias does not exist
2018-08-08 08:17:10 -07:00
Anant Prakash 38965ef5e2
Support PUTing typing status in clientapi (#550)
* Add handler for typing events

* Add typing events producer

* Setup typing server component

* Send one event per API call
2018-07-24 20:19:49 +05:30
Anant Prakash 29532e7bc3 Make clientapi:sendevents idempotent (#444)
* Add transactions.Cache to clientapi setup

* Add idempotency to clientapi/SendEvent
2018-05-18 10:49:40 +01:00
Erik Johnston d22fb24a66
Factor out component setup from commands (#384)
* Add base component

* Convert clientapi to using base component

* Convert federationapi to using base component

* Convert federationsender to using base component

* Convert mediaapi to using base component

* Convert publicroomsapi to using base component

* Convert roomserver to using base component

* Convert syncapi to using base component

* Convert monolith to using base component

* Split out config parsing and roomserver API creation
2018-01-02 10:26:56 +00:00
Erik Johnston 578d8cf492
Add CORS headers to all responses including errors (#364) 2017-12-06 09:36:50 +00:00
Richard van der Hoff bf855a7e5c
Factor out keyring initialisation (#329)
Take the keyring init from the client-api-server and the monolith out to a
shared file
2017-11-13 18:39:09 +00:00
Erik Johnston 464fb5de1c Update vendor libraries and dendrite to s/Sirupsen/sirupsen/ (#304) 2017-10-13 14:42:57 +01:00
Erik Johnston ba0d0672ea Rename kafka consumers to *Consumer (#294)
The prior naming was confusing, OutputRoomEvent consumed
OutputNewRoomEvents
2017-10-11 18:13:43 +01:00
Mark Haines 847621bc5d Add config for setting up a jaeger opentracing reporter (#271)
* Add config for setting up a jaeger opentracing reporter

* Remove redundant comment
2017-09-28 17:00:23 +01:00
Erik Johnston fad997303b Turn on 'unparam' linting (#216)
* Turn on 'unparam' linting

* Increase deadline

* Fix mediaapi integeration test
2017-09-07 12:50:39 +01:00
Mark Haines c27d1fdfb4 Optionally use naffka in the monolithic server (#183)
* dependency injection for the kafka consumers/producers

* Optionally use naffka in the monolithic server

* remember to call setupKafka()

* tweak imports

* fix integration tests

* Add use_naffka to the example config

* Update comment on the listen APIs
2017-08-16 13:36:41 +01:00
Mark Haines 1a28cf9767 Add a monolithic server that combines all the components into one (#175)
* Add a monolithic server that combines all the components into one

* Review comments

* Expose the matrix APIs directly
2017-08-04 13:12:36 +01:00
Mark Haines 4975eb9074 Move setting up the api mux to outside the routing.Setup functions. (#173)
This makes it possible to setup all the component APIs on a single http
listener which is necessary if we want to combine all the components
into a single monolith.
2017-08-03 15:10:39 +01:00
Brendan Abolivier 0fbb8b7824 Make account data sync incremental (#170)
* Clean roomserver consumer

* Make account data sync incremental

* Use a different name for the sync AD table

* Improved error logging

* Created missing topic in tests

* Add client API topic to tests

* Add client API topic to common

* Move data batch retrieval

* Add database index for data retrieval

* Fix typo in table name

* Fix indentation
2017-08-02 16:21:35 +01:00
Brendan Abolivier c7e36ba2a1 Implement room aliases (#167)
* Add database functions to interact with aliases

* Save room alias

* Check if alias already exists

* Implement local alias lookup

* Implement alias removal

* Move alias API

* Handle case with no alias set for a room

* Apply requested changes
2017-07-28 11:31:43 +01:00
Mark Haines e6d77d6bde Use HTTP API for roomserver input. (#161)
* Use HTTP API for roomserver input.

* Use synchronous HTTP API for writing events to the roomserver

* Remove unused config for kafka topic

* Tweak comments
2017-07-18 13:40:03 +01:00
Brendan Abolivier d9b8e5de45 Keep track of membership in Client API (#159)
* Saving memberships

* Removed unused index

* Removed useless log

* Fixed membership not being saved on the right conditions + added membership removal

* Updated outdated comment

* Use server lib method + check server name + use new roomserver API

* Better handling of events from the room server

* Fixed membership removal

* Corrected indentation

* Fix tests (hopefully)

* Replace broken kafka mirror

* Apply requested changes on database management

* Remove useless check and function

* Moved memberships update to the database package

* Use new common function

* Remove useless function
2017-07-17 18:10:56 +01:00
Brendan Abolivier 355ab5eedf Notify profile update (#153)
* Profile retrieval

* Saving avatar (without propagating it)

* Saving display name (without propagating it)

* Getters for display name and avatar URL

* Doc'd

* Introduced new Kafka topic and producer

* Updated config with new kafka topic

* Switched to samara producer and now sending messages

* Doc'd

* Put kafka update after the database insert

* Doc'd profileUpdate structure

* Removed unused parameter

* Moved user updates producer to clientapi/producers
2017-07-11 14:14:06 +01:00
Mark Haines e67f9401be Replace the cmd specific config with common config. (#144)
* Move all the dendrite config in to a single place

* Add tests for config parsing

* replace syncserver config with common config

* Replace client API config with common config

* Replace federation API config with common config

* Replace media api config with common config

* Replace room server config with common config

* Remove unused readKey function

* Fix the integration tests

* Comment on hardcoding roomserver to HTTP

* Add a method for getting RoomServerURL

This moves the hardcoding of HTTPs into one place.
2017-06-19 15:21:04 +01:00
Mark Haines 7cbdab30f4 Add a database for storing the server keys (#137)
* Add a database for storing the server keys

* Tweak wording, and comment on the resolution of the timestamp

* Update gomatrixserverlib
2017-06-09 18:07:34 +01:00
Mark Haines 84ad4ff9f6 Start implementing /join for room aliases for rooms the server is not in. (#115)
* Start implementing the join room API

* Hacks to get join room working

* Make the TLS fingerprint configurable

* Fix the client API proxy to handle '#' correctly

* Return a 200 OK response

* Write the join event along with current state to the room server

* Comment on the error handling

* Fix typos

* Fix tab

* Add TODO for moving authEventIDs to gomatrixserverlib

* Comment on why we ignore the key ID argument for local keys

* Avoid 'preceeded'

* Neaten the control flow

* Neaten the control flow even more

* Return pointers

* Rename err to lastErr for the loop
2017-05-25 16:08:28 +01:00
Kegsay 445dce14ae Add in devices_table to store device information (#118) 2017-05-25 13:33:50 +01:00
Kegsay 3b9222e8f7 Glue together devices and auth with the current HTTP code (#117)
- Renamed `clientapi/auth/types` to `clientapi/auth/authtypes` for the same
  horrible namespace clashing reasons as `storage`.
- Factored out `makeAPI` to `common`.
- Added in `makeAuthAPI`.
2017-05-23 17:43:05 +01:00
Kegsay d63a1ddc7c Rename packages under /auth (#114)
Previously, all database stuff was under the helpfully named
package 'storage'. However, this convention is used throughout all
of dendrite, which will clash the moment we want to add auth to all
the CS API endpoints. To prevent the package name clash, add
sub-directories which represent what is being stored so the final
usage ends up being:

```
func doThing(db *storage.SyncServerDatabase, authDB *accounts.Database)
{
    // ...
}
```
2017-05-22 16:49:32 +01:00
Kegsay 0325459e7f Implement dummy registration and hook it up to AccountDatabase (#113) 2017-05-22 15:55:39 +01:00
Mark Haines 6605333f6f Start implementing the federation server keys API. (#112)
* Start implementing the federation server keys API.

* Fix copyright

* Fix comments

* Comment on the key format

* Better explain what the ValidityPeriod is

* Return a 200 status code
2017-05-19 16:06:41 +01:00
Robert Swain b33ed93dd6 Merge branch 'master' into rob/common-logging 2017-04-21 01:43:36 +02:00
Robert Swain d09a65abbe Add Apache Version 2.0 license and headers to all golang files 2017-04-21 00:40:52 +02:00
Robert Swain 2278848922 Rename dendrite-clientapi to dendrite-client-api-server 2017-04-20 19:21:15 +02:00
Renamed from src/github.com/matrix-org/dendrite/cmd/dendrite-clientapi/main.go (Browse further)