Browse Source

Add device ID to the configuration

Signed-off-by: Nikos Filippakis <me@nfil.dev>
pull/324/head
Nikos Filippakis 4 years ago
parent
commit
f890cc9fa4
No known key found for this signature in database GPG Key ID: 7110E4356101F017
  1. 2
      api/api.go
  2. 1
      clients/clients.go

2
api/api.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

1
clients/clients.go

@ -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(),

Loading…
Cancel
Save