diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-05-10 20:09:44 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-05-10 20:09:44 +0300 |
commit | 7d48d8538f907f4663771ee49cd18efc8bf6585e (patch) | |
tree | f2c177f49221befa8d5bb7d45fcf5ed73cd55c2e | |
parent | 5a316b953f540d366dc0f31374ef90ba79b0f4e8 (diff) |
Set different user agent
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 2 | ||||
-rw-r--r-- | gomuks.go | 4 | ||||
-rw-r--r-- | interface/gomuks.go | 1 | ||||
-rw-r--r-- | matrix/matrix.go | 1 |
5 files changed, 9 insertions, 1 deletions
@@ -22,7 +22,7 @@ require ( golang.org/x/net v0.0.0-20200505041828-1ed23360d12c gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 gopkg.in/yaml.v2 v2.2.8 - maunium.net/go/mautrix v0.4.1 + maunium.net/go/mautrix v0.4.2 maunium.net/go/mauview v0.1.1 maunium.net/go/tcell v0.2.0 ) @@ -103,6 +103,8 @@ maunium.net/go/mautrix v0.3.4 h1:0X8VPXqG2i1nh/P5J0ZRu8ioed6hwK5SBBEQkUuFb68= maunium.net/go/mautrix v0.3.4/go.mod h1:SkGZzch8CvU2qKtNpYxtzZ0sQxfVEJ3IsVVLSUBUx9Y= maunium.net/go/mautrix v0.4.1 h1:i2lJNT+TE4AAL3cVKUN4jKVRkujCE/oS8aIsj8+7iNE= maunium.net/go/mautrix v0.4.1/go.mod h1:8Y+NqmROJyWYvvP4yPfX9tLM59VCfgE/kcQ0SeX68ho= +maunium.net/go/mautrix v0.4.2 h1:GBU++Z7o/fLPcEsNMkNOUsnDknwV/MGPQ0BN4ikK6tw= +maunium.net/go/mautrix v0.4.2/go.mod h1:8Y+NqmROJyWYvvP4yPfX9tLM59VCfgE/kcQ0SeX68ho= maunium.net/go/mauview v0.1.0 h1:x2WdkKI2zdriJuPAB0CKlwmnHGE7W9xfM5z6RgG+IIg= maunium.net/go/mauview v0.1.0/go.mod h1:og9WbzmWe9SNYNyOFlCv8qa9zMcOvG2nzRJ5vYyud9U= maunium.net/go/mauview v0.1.1 h1:wfTXyPx3LGAGpTskh+UbBv/QItUWnEpaneHmywoYnfY= @@ -55,6 +55,10 @@ func NewGomuks(uiProvider ifc.UIProvider, configDir, dataDir, cacheDir, download return gmx } +func (gmx *Gomuks) Version() string { + return "v0.1.0" +} + // Save saves the active session and message history. func (gmx *Gomuks) Save() { gmx.config.SaveAll() diff --git a/interface/gomuks.go b/interface/gomuks.go index ada1b87..e269071 100644 --- a/interface/gomuks.go +++ b/interface/gomuks.go @@ -25,6 +25,7 @@ type Gomuks interface { Matrix() MatrixContainer UI() GomuksUI Config() *config.Config + Version() string Start() Stop(save bool) diff --git a/matrix/matrix.go b/matrix/matrix.go index bff9bd2..1407125 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -117,6 +117,7 @@ func (c *Container) InitClient() error { if err != nil { return err } + c.client.UserAgent = fmt.Sprintf("gomuks %s (with mautrix-go %s)", c.gmx.Version(), mautrix.Version) c.client.Logger = mxLogger{} c.client.DeviceID = c.config.DeviceID |