* 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
- 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`.
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)
{
// ...
}
```
This avoids having to sanitize the origin and media ID for files from
remote servers. It also allows us to deduplicate files across all files
uploaded to this homeserver or downloaded from remote homeservers.
A SHA-256 hash sum in golang base64 URLEncoding format (contains only
URL-safe characters) is now calculated and stored for every file
transferred to this server.
Uploads to the server use this hash as the MediaID. Downloads from
remote servers retain their MediaID from the remote server, but can use
the hash for local deduplication and integrity checking purposes.
* 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
From experience with synapse, splitting the files into subdirectories
based on the beginnings of the filenames helps with browsability. As we
are using MediaIDs that are base64-encoded, each character has 64
possibilities, which is a nice upper limit on the number of
subdirectories in a directory in terms of browsing. We have two levels
of single character directories for added convenience, creating up to
4096 buckets.