Skip to content

Commit

Permalink
uid fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sdfsdhgjkbmnmxc committed Oct 1, 2020
1 parent f0100cd commit f1075a1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/tada-team/tdclient
go 1.14

require (
github.com/google/uuid v1.1.2
github.com/gorilla/websocket v1.4.2
github.com/json-iterator/go v1.1.10
github.com/manifoldco/promptui v0.7.0
github.com/pkg/errors v0.9.1
github.com/satori/go.uuid v1.2.0
github.com/tada-team/kozma v1.1.0
github.com/tada-team/tdproto v1.2.8
)
Expand Down
18 changes: 8 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
Expand All @@ -13,8 +16,10 @@ github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
Expand All @@ -30,25 +35,18 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLD
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/tada-team/kozma v1.1.0 h1:BGwxSK43Dpr6wKoXVTVbdfoTFTptOEhxmni6aCOreJU=
github.com/tada-team/kozma v1.1.0/go.mod h1:TIsa1b64SsrVPFEqdoJDnMhO3HYFVpN0B0t2GKh93uY=
github.com/tada-team/tdproto v0.0.3 h1:BCkh0cDz7EU778FmfpzEWn7Ifvl+KyYW+yttK339Kpc=
github.com/tada-team/tdproto v0.0.3/go.mod h1:VY1rTZXOhMxyZ1VE/Q82PB27AaFAooEQJFkO0HMlN8M=
github.com/tada-team/tdproto v0.0.7 h1:eGQQG+/QNwWp0savQmnirJ80gmMajsR2MI6fyzCPNi8=
github.com/tada-team/tdproto v0.0.7/go.mod h1:eQGUKL2y6C9EGrhOZY0HU7bb/5lBdVfHBlx2+e0l7x4=
github.com/tada-team/tdproto v0.0.12 h1:mVKzWHsu6rWyz1idWP6ewe5rCtThiU9CcukZiTo8URM=
github.com/tada-team/tdproto v0.0.12/go.mod h1:eQGUKL2y6C9EGrhOZY0HU7bb/5lBdVfHBlx2+e0l7x4=
github.com/tada-team/tdproto v0.2.1 h1:uCHXKzoETO1lvbpO9WEmgqhSp+PBmlxF+08m4cDUNQs=
github.com/tada-team/tdproto v0.2.1/go.mod h1:eQGUKL2y6C9EGrhOZY0HU7bb/5lBdVfHBlx2+e0l7x4=
github.com/tada-team/tdproto v1.2.0 h1:/JgP9RGDlHtmS20q9RCCxKFhzPwWgWdVeCcMqiwbtuM=
github.com/tada-team/tdproto v1.2.0/go.mod h1:5kJ3cQ5igf9tQoJR+v2Q6TxzfpOT2Q9I0DfKzlVUj0c=
github.com/tada-team/tdproto v1.2.8 h1:uxLb8bWlLds1eEYsgEUmEtRbO8abvDHVQv2IAWqhN9o=
github.com/tada-team/tdproto v1.2.8/go.mod h1:cuT572dAExhZW7lUkVz23ijVyszgNN7KyKpE7OyWT88=
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b h1:MQE+LT/ABUuuvEZ+YQAMSXindAdUh7slEmAkup74op4=
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5 changes: 2 additions & 3 deletions v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package tdclient
import (
"fmt"

uuid "github.com/satori/go.uuid"

"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/tada-team/tdproto"
"github.com/tada-team/tdproto/tdapi"
Expand Down Expand Up @@ -151,7 +150,7 @@ func (s Session) SendPlaintextMessage(teamUid string, chat tdproto.JID, text str
req.Mediatype = tdproto.MediatypePlain
req.Text = text

req.MessageUid = uuid.NewV4().String()
req.MessageUid = uuid.New().String()

resp := new(struct {
tdapi.Resp
Expand Down
4 changes: 2 additions & 2 deletions ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"time"

"github.com/google/uuid"
"github.com/gorilla/websocket"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
"github.com/tada-team/tdproto"
)

Expand Down Expand Up @@ -76,7 +76,7 @@ func (w *WsSession) Ping() string {
}

func (w *WsSession) SendPlainMessage(to tdproto.JID, text string) string {
uid := uuid.NewV4().String()
uid := uuid.New().String()
w.Send(tdproto.NewClientMessageUpdated(tdproto.ClientMessageUpdatedParams{
MessageId: uid,
To: to,
Expand Down

0 comments on commit f1075a1

Please sign in to comment.