Update to go-nc-talk v0.2.2

Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
Gary Kim
2021-05-27 19:24:45 -04:00
parent 4d4a93405a
commit e4661f2b4b
4 changed files with 6 additions and 9 deletions

2
go.mod
View File

@@ -53,7 +53,7 @@ require (
github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c
gomod.garykim.dev/nc-talk v0.2.1
gomod.garykim.dev/nc-talk v0.2.2
gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376
layeh.com/gumble v0.0.0-20200818122324-146f9205029b
)

4
go.sum
View File

@@ -1243,8 +1243,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gomod.garykim.dev/nc-talk v0.2.1 h1:O+5IAdAhQCh5fiR+Ye3ljsdUktl8fXw1/+3ZMItX8WQ=
gomod.garykim.dev/nc-talk v0.2.1/go.mod h1:q/Adot/H7iqi+H4lANopV7/xcMf+sX3AZXUXqiITwok=
gomod.garykim.dev/nc-talk v0.2.2 h1:+U+daJFPPuwM7yRXYazeMHZgIBSGP6SeQURO0O5a32I=
gomod.garykim.dev/nc-talk v0.2.2/go.mod h1:q/Adot/H7iqi+H4lANopV7/xcMf+sX3AZXUXqiITwok=
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=

View File

@@ -123,14 +123,11 @@ func (t *TalkRoom) DeleteMessage(messageID int) (*ocs.TalkRoomMessageData, error
if res.StatusCode() != http.StatusOK && res.StatusCode() != http.StatusAccepted {
return nil, ErrUnexpectedReturnCode
}
msgInfo, err := ocs.TalkRoomMessageDataUnmarshal(&res.Data)
msgInfo, err := ocs.TalkRoomSentResponseUnmarshal(&res.Data)
if err != nil {
return nil, err
}
if len(msgInfo.OCS.TalkRoomMessage) == 0 {
return nil, ErrUnexpectedResponse
}
return &msgInfo.OCS.TalkRoomMessage[0], nil
return &msgInfo.OCS.TalkRoomMessage, nil
}
// ReceiveMessages starts watching for new messages

2
vendor/modules.txt vendored
View File

@@ -384,7 +384,7 @@ golang.org/x/text/unicode/norm
golang.org/x/text/width
# golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
golang.org/x/time/rate
# gomod.garykim.dev/nc-talk v0.2.1
# gomod.garykim.dev/nc-talk v0.2.2
## explicit
gomod.garykim.dev/nc-talk/constants
gomod.garykim.dev/nc-talk/ocs