Bumped cchat to v0.0.37
This commit is contained in:
parent
3155c1b6d6
commit
234e7592c2
|
@ -66,15 +66,15 @@ func (ch *Channel) Name() text.Rich {
|
|||
// for that.
|
||||
//
|
||||
// The given context is cancelled.
|
||||
func (ch *Channel) Nickname(ctx context.Context, labeler cchat.LabelContainer) error {
|
||||
func (ch *Channel) Nickname(ctx context.Context, labeler cchat.LabelContainer) (func(), error) {
|
||||
// Simulate IO with cancellation. Ignore the error if it's a simulated time
|
||||
// out, else return.
|
||||
if err := simulateAustralianInternetCtx(ctx); err != nil && err != ErrTimedOut {
|
||||
return err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
labeler.SetLabel(ch.username)
|
||||
return nil
|
||||
return func() {}, nil
|
||||
}
|
||||
|
||||
func (ch *Channel) JoinServer(ctx context.Context, ct cchat.MessagesContainer) (func(), error) {
|
||||
|
|
2
go.mod
2
go.mod
|
@ -4,6 +4,6 @@ go 1.14
|
|||
|
||||
require (
|
||||
github.com/Pallinder/go-randomdata v1.2.0
|
||||
github.com/diamondburned/cchat v0.0.35
|
||||
github.com/diamondburned/cchat v0.0.37
|
||||
github.com/pkg/errors v0.9.1
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -58,6 +58,10 @@ github.com/diamondburned/cchat v0.0.34 h1:BGiVxMRA9dmW3rLilIldBvjVan7eTTpaWCCfX9
|
|||
github.com/diamondburned/cchat v0.0.34/go.mod h1:+zXktogE45A0om4fT6B/z6Ii7FXNafjxsNspI0rlhbU=
|
||||
github.com/diamondburned/cchat v0.0.35 h1:WiMGl8BQJgbP9E4xRxgLGlqUsHpTcJgDKDt8/6a7lBk=
|
||||
github.com/diamondburned/cchat v0.0.35/go.mod h1:+zXktogE45A0om4fT6B/z6Ii7FXNafjxsNspI0rlhbU=
|
||||
github.com/diamondburned/cchat v0.0.36 h1:fOD84RV7EUCjoOSogX/Hu5pe4tzHk3Qh7taKaojIAGc=
|
||||
github.com/diamondburned/cchat v0.0.36/go.mod h1:+zXktogE45A0om4fT6B/z6Ii7FXNafjxsNspI0rlhbU=
|
||||
github.com/diamondburned/cchat v0.0.37 h1:yGz9yls5Lb/vLkU/DU53GjC80WOqoRe229DXsu5mtaY=
|
||||
github.com/diamondburned/cchat v0.0.37/go.mod h1:+zXktogE45A0om4fT6B/z6Ii7FXNafjxsNspI0rlhbU=
|
||||
github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac=
|
||||
github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
|
|
|
@ -159,12 +159,12 @@ func (s *Session) Servers(container cchat.ServersContainer) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *Session) Icon(ctx context.Context, iconer cchat.IconContainer) error {
|
||||
func (s *Session) Icon(ctx context.Context, iconer cchat.IconContainer) (func(), error) {
|
||||
// Simulate IO while ignoring the context.
|
||||
simulateAustralianInternet()
|
||||
|
||||
iconer.SetIcon(avatarURL)
|
||||
return nil
|
||||
return func() {}, nil
|
||||
}
|
||||
|
||||
func (s *Session) Save() (map[string]string, error) {
|
||||
|
|
Loading…
Reference in New Issue