Browse Source
Add device ID to the configuration
Signed-off-by: Nikos Filippakis <me@nfil.dev>
pull/324/head
Nikos Filippakis
5 years ago
No known key found for this signature in database
GPG Key ID: 7110E4356101F017
2 changed files with
3 additions and
0 deletions
-
api/api.go
-
clients/clients.go
|
|
@ -63,6 +63,8 @@ type ClientConfig struct { |
|
|
|
HomeserverURL string |
|
|
|
// The matrix access token to authenticate the requests with.
|
|
|
|
AccessToken string |
|
|
|
// The device ID for this access token.
|
|
|
|
DeviceID id.DeviceID |
|
|
|
// True to start a sync stream for this user, making this a "syncing client". If false, no
|
|
|
|
// /sync goroutine will be created and this client won't listen for new events from Matrix. For services
|
|
|
|
// which only SEND events into Matrix, it may be desirable to set Sync to false to reduce the
|
|
|
|
|
|
@ -347,6 +347,7 @@ func (c *Clients) newClient(config api.ClientConfig) (*mautrix.Client, error) { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
client.Client = c.httpClient |
|
|
|
client.DeviceID = config.DeviceID |
|
|
|
syncer := client.Syncer.(*mautrix.DefaultSyncer) |
|
|
|
nebStore := &matrix.NEBStore{ |
|
|
|
InMemoryStore: *mautrix.NewInMemoryStore(), |
|
|
|