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 f862398 commit f0100cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ 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
Expand Down
1 change: 1 addition & 0 deletions v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func (s Session) SendPlaintextMessage(teamUid string, chat tdproto.JID, text str
req := new(tdapi.Message)
req.Mediatype = tdproto.MediatypePlain
req.Text = text

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

resp := new(struct {
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.New().String()
uid := uuid.NewV4().String()
w.Send(tdproto.NewClientMessageUpdated(tdproto.ClientMessageUpdatedParams{
MessageId: uid,
To: to,
Expand Down

0 comments on commit f0100cd

Please sign in to comment.