Nikos Filippakis
c06d5033d3
Start creating the database APIs for the crypto store
Signed-off-by: Nikos Filippakis <me@nfil.dev>
6 years ago
Nikos Filippakis
584d674747
Move some of the client and crypto logic to a new BotClient type
Signed-off-by: Nikos Filippakis <me@nfil.dev>
6 years ago
Nikos Filippakis
2f0e15ef08
Basic e2ee support for some commands
Signed-off-by: Nikos Filippakis <me@nfil.dev>
6 years ago
Nikos Filippakis
f890cc9fa4
Add device ID to the configuration
Signed-off-by: Nikos Filippakis <me@nfil.dev>
6 years ago
Nikos Filippakis
6409b00205
[WIP] Switch Gomatrix for Mautrix ( #322 )
* Switch core functionality to Mautrix
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Convert and re-enable rssbot
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Convert and re-enable giphy service
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Convert and re-enable wikipedia, imgur and guggy services
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Convert and re-enable Github realm and service, and update go-github
version
Signed-off-by: Nikos Filippakis <me@nfil.dev>
* Convert and add the rest of the services
Re-enables the services: alertmanager, google, jira, slackapi, travisci
Signed-off-by: Nikos Filippakis <me@nfil.dev>
6 years ago
Nikos Filippakis
1e297c50ad
Re-format project as a Go module ( #310 )
* 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>
6 years ago
Kegan Dougal
96109afd41
Add "!github help" and fix command selection bug
The last command would always be chosen due to pointer fail.
9 years ago
Kegan Dougal
34ea2d06ce
Give a more helpful error message if a service is created with an unknown user ID
9 years ago
Kegan Dougal
8d75494c19
Also log when clients are created
9 years ago
Kegan Dougal
efe04d7917
Keep doing the Inviter hack when joining rooms so non-ops can kick the bot they invited
9 years ago
Kegan Dougal
e94ab0d18e
And log when we stop
9 years ago
Kegan Dougal
9708e6351b
Stop syncing on nil errors
9 years ago
Kegan Dougal
60429f32b3
Bug fixes
9 years ago
Kegan Dougal
b98e878227
Use gomatrix
9 years ago
Kegan Dougal
a9899557c5
Fix #72 : Support smart quotes
9 years ago
Kegan Dougal
7a382c8120
Add failing command parse tests
9 years ago
Kegan Dougal
7580d93042
400 if a service which needs a syncing client is configured without one
This catches a common configuration error and fails early.
9 years ago
Kegan Dougal
3e21e02171
Remove Plugin. Replace with Commands() and Expansions()
Also split out `types.go` into separate files by the area they cover
(services, auth, actions).
9 years ago
Kegan Dougal
5c65d4cf95
Add a mock HTTP client for Matrix clients to use. Add example test.
This will need rejigging at some point to make the test easier to set up.
9 years ago
Kegan Dougal
295c9bbb4b
Add 'api' package and move HTTP API requests there
This will make docs easier in addition to allowing the 'database' package
not circular-dep.
9 years ago
Kegan Dougal
178ae79e29
Review comments
9 years ago
Kegan Dougal
b59d43b810
Add a `NextBatchStorer` interface to load/save next_batch tokens
Gets around cyclic dependencies.
9 years ago
Kegan Dougal
5f9a065d83
Persist next_batch tokens
Indirect this through a `NextBatchStore` type to get around circular dependencies
which are formed if you try to inline it in the `Sync()` while loop.
Fork out event handlers to separate functions in `Clients` to make gocyclo happy.
Add `UPDATE` query for `next_batch`.
9 years ago
Kegan Dougal
7bafa40708
Only Sync if told to do so
9 years ago
Kegan Dougal
314b63e900
Set the desired DisplayName for a client when it is being configured
9 years ago
Kegan Dougal
6f2d9dc72c
Add giphy integration
10 years ago
Kegan Dougal
8b44f3658c
Support bot options and implement github bot options for default repos
- Add a new `bot_options` table
- Allow github expansions/commands to omit the owner/repo and use a default if set
10 years ago
Kegan Dougal
15dc39dedc
Add an inviter key when joining rooms
10 years ago
Kegan Dougal
c7114907f6
Auto-join rooms if set in config
10 years ago
Kegan Dougal
8f8dec5539
Sync rooms on startup
10 years ago
Kegan Dougal
97a292c65f
Change how Services are notified for incoming !commands and expansions
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.
10 years ago
Kegan Dougal
8598e71124
Send webhook notifications to rooms specified in the service config
10 years ago
Kegan Dougal
edf3f87674
Move database/types.go to types/types.go in its own 'types' package
There is nothing specific to the types to warrant them being under the database
package.
10 years ago
Kegan Dougal
8af5086985
s/Make/New/ as is the convention in the golang stdlib
10 years ago
Mark Haines
9c83637852
An extensible Matrix bot written in Go
10 years ago