diff --git a/api/api.go b/api/api.go index 01ca8c1..2b2f6de 100644 --- a/api/api.go +++ b/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 diff --git a/clients/clients.go b/clients/clients.go index fc2c285..6d7e502 100644 --- a/clients/clients.go +++ b/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(),