golint has been deprecated and archived. There's no 1:1 match for it,
but staticcheck is a checker the golint README recommends and has tons
of useful checks.
This commit enables all checks, and then disables:
* ST1000: Incorrect or missing package comment
* ST1005: Incorrectly formatted error string, necessary due to the fact
that all our error strings are capitalised, which they should not be
* SA1019: Locally in goneb.go because we have to rework how we use the
prometheus package there
It also fixes a number of other errors surfaced by staticheck.
* Handle SAS verification by exposing an endpoint where the SAS can be sent to be verified
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Init cryptotest service with basic commands
* Add cryptotest service with challenge request / response / session invalidation commands
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Add cryptotest methods for testing key forwarding
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Add help messages for cryptotest cmds
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Add newer apt repository for updated libolm
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Move command functionalities for cryptotest to different functions
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Fixed cryptotest service and package name from echo
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Control which users can start a SAS verification with Neb through regexes in the config
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Have maximum number of ongoing verifications at any time
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Fix Trace to Tracef
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Define project as a Go module and update dependency versions
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Update docs, configs and dockerfile to use latest Go version
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Add postgres database driver
Signed-off-by: Nikos Filippakis <me@nfil.dev>
Previously, we would notify `Services` based on matching the `room_id` of the
event with a list of `RoomIDs()` which the service returned.
Now we notify `Services` based on matching the `user_id` of the client listening
for events. This means that the service will receive more events because there
isn't a filter on a set of room IDs.
This is required in order to implement "auto-join on invite" semantics for
Services, as the room ID is not known at that point in time.