Commit Graph

13 Commits

Author SHA1 Message Date
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