From 4ac86fee98d61570acf8f6ab22582e4c42d2c7a5 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Fri, 21 Oct 2022 16:05:58 -0500 Subject: [PATCH] use Beeper fork of groupme API library Signed-off-by: Sumner Evans --- database/message.go | 2 +- database/portal.go | 2 +- database/puppet.go | 2 +- database/reactions.go | 2 +- database/user.go | 2 +- example-config.yaml | 2 +- formatting.go | 3 ++- go.mod | 9 ++------- go.sum | 8 ++------ groupmeext/client.go | 2 +- groupmeext/message.go | 2 +- groupmeext/subscription.go | 3 ++- main.go | 2 +- metrics.go | 3 ++- portal.go | 3 ++- puppet.go | 3 ++- user.go | 2 +- 17 files changed, 24 insertions(+), 28 deletions(-) diff --git a/database/message.go b/database/message.go index b8299d3..0ff59e8 100644 --- a/database/message.go +++ b/database/message.go @@ -25,7 +25,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/dbutil" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) type MessageQuery struct { diff --git a/database/portal.go b/database/portal.go index b0d8a11..1d3e3e6 100644 --- a/database/portal.go +++ b/database/portal.go @@ -26,7 +26,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/dbutil" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) // GMID is the puppet or the group diff --git a/database/puppet.go b/database/puppet.go index 36f0c59..08d3cd3 100644 --- a/database/puppet.go +++ b/database/puppet.go @@ -24,7 +24,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/dbutil" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) type PuppetQuery struct { diff --git a/database/reactions.go b/database/reactions.go index 01f9ec2..c621ee6 100644 --- a/database/reactions.go +++ b/database/reactions.go @@ -8,7 +8,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/dbutil" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) type ReactionQuery struct { diff --git a/database/user.go b/database/user.go index 5736a71..d50bb55 100644 --- a/database/user.go +++ b/database/user.go @@ -27,7 +27,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/dbutil" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) type UserQuery struct { diff --git a/example-config.yaml b/example-config.yaml index 9a8c952..6b6c102 100644 --- a/example-config.yaml +++ b/example-config.yaml @@ -9,7 +9,7 @@ homeserver: # Changing these values requires regeneration of the registration. appservice: # The address that the homeserver can use to connect to this appservice. - address: http://localhost:29318 + address: http://localhost:29328 # The hostname and port where this appservice should listen. hostname: 0.0.0.0 diff --git a/formatting.go b/formatting.go index 2339530..ac2273c 100644 --- a/formatting.go +++ b/formatting.go @@ -21,9 +21,10 @@ import ( "regexp" "strings" - "github.com/karmanyaahm/groupme" "maunium.net/go/mautrix/format" "maunium.net/go/mautrix/id" + + "github.com/beeper/groupme-lib" ) var italicRegex = regexp.MustCompile("([\\s>~*]|^)_(.+?)_([^a-zA-Z\\d]|$)") diff --git a/go.mod b/go.mod index 87b5b00..ef5dba8 100644 --- a/go.mod +++ b/go.mod @@ -4,15 +4,13 @@ go 1.19 require ( github.com/Rhymen/go-whatsapp v0.1.1 + github.com/beeper/groupme-lib v0.2.1-0.20221021205945-8f23e04eea71 github.com/gabriel-vasile/mimetype v1.1.2 github.com/gorilla/websocket v1.5.0 - github.com/karmanyaahm/groupme v0.0.0 github.com/karmanyaahm/wray v0.0.0-20210303233435-756d58657c14 github.com/lib/pq v1.10.7 github.com/mattn/go-sqlite3 v1.14.15 github.com/prometheus/client_golang v1.9.0 - gorm.io/gorm v1.20.12 - maunium.net/go/mauflag v1.0.0 maunium.net/go/maulogger/v2 v2.3.2 maunium.net/go/mautrix v0.12.3-0.20221020190005-d0c13d2f04a1 ) @@ -23,8 +21,6 @@ require ( github.com/golang/protobuf v1.4.3 // indirect github.com/google/uuid v1.2.0 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jinzhu/now v1.1.1 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect @@ -44,6 +40,5 @@ require ( golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/protobuf v1.25.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + maunium.net/go/mauflag v1.0.0 // indirect ) - -replace github.com/karmanyaahm/groupme => ../groupme-lib diff --git a/go.sum b/go.sum index e138f71..2f806a8 100644 --- a/go.sum +++ b/go.sum @@ -30,6 +30,8 @@ github.com/autogrowsystems/wray v0.0.0-20160519030252-f36984f6648c/go.mod h1:dru github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beeper/groupme-lib v0.2.1-0.20221021205945-8f23e04eea71 h1:QfLfltOhTgjFQAY1P8dkDx1NhXPmo21vxmlgnh4NiEc= +github.com/beeper/groupme-lib v0.2.1-0.20221021205945-8f23e04eea71/go.mod h1:8AdyorS5ZuqSarqY/HD+p6sYf+gMr8+pm33U687568g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -153,10 +155,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -483,8 +481,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.20.12 h1:ebZ5KrSHzet+sqOCVdH9mTjW91L298nX3v5lVxAzSUY= -gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/groupmeext/client.go b/groupmeext/client.go index a4cacbc..7e21a63 100644 --- a/groupmeext/client.go +++ b/groupmeext/client.go @@ -3,7 +3,7 @@ package groupmeext import ( "context" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) type Client struct { diff --git a/groupmeext/message.go b/groupmeext/message.go index f680dd3..b65a028 100644 --- a/groupmeext/message.go +++ b/groupmeext/message.go @@ -9,7 +9,7 @@ import ( "io/ioutil" "net/http" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" ) type Message struct{ groupme.Message } diff --git a/groupmeext/subscription.go b/groupmeext/subscription.go index fb75844..03e6dd8 100644 --- a/groupmeext/subscription.go +++ b/groupmeext/subscription.go @@ -3,8 +3,9 @@ package groupmeext import ( log "maunium.net/go/maulogger/v2" - "github.com/karmanyaahm/groupme" "github.com/karmanyaahm/wray" + + "github.com/beeper/groupme-lib" ) type fayeLogger struct { diff --git a/main.go b/main.go index 387473f..c1be898 100644 --- a/main.go +++ b/main.go @@ -25,7 +25,7 @@ import ( "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/util/configupgrade" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" "github.com/beeper/groupme/config" "github.com/beeper/groupme/database" diff --git a/metrics.go b/metrics.go index b197e36..428923b 100644 --- a/metrics.go +++ b/metrics.go @@ -22,12 +22,13 @@ import ( "runtime/debug" "time" - "github.com/karmanyaahm/groupme" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" log "maunium.net/go/maulogger/v2" + "github.com/beeper/groupme-lib" + "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" diff --git a/portal.go b/portal.go index 73a3f0d..e71f96a 100644 --- a/portal.go +++ b/portal.go @@ -39,7 +39,8 @@ import ( "github.com/Rhymen/go-whatsapp" "github.com/gabriel-vasile/mimetype" - "github.com/karmanyaahm/groupme" + + "github.com/beeper/groupme-lib" "maunium.net/go/mautrix" "maunium.net/go/mautrix/appservice" diff --git a/puppet.go b/puppet.go index 0f29dd2..15a2dcc 100644 --- a/puppet.go +++ b/puppet.go @@ -22,9 +22,10 @@ import ( "regexp" "strings" - "github.com/karmanyaahm/groupme" log "maunium.net/go/maulogger/v2" + "github.com/beeper/groupme-lib" + "maunium.net/go/mautrix/appservice" "maunium.net/go/mautrix/bridge" "maunium.net/go/mautrix/id" diff --git a/user.go b/user.go index e2a79a7..c8accb0 100644 --- a/user.go +++ b/user.go @@ -38,7 +38,7 @@ import ( "maunium.net/go/mautrix/format" "maunium.net/go/mautrix/id" - "github.com/karmanyaahm/groupme" + "github.com/beeper/groupme-lib" "github.com/beeper/groupme/database" "github.com/beeper/groupme/groupmeext"