Skip to content

Commit

Permalink
Update to latest gocommon
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed May 9, 2024
1 parent 76a2d1d commit eeb5e34
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/jmoiron/sqlx v1.4.0
github.com/lib/pq v1.10.9
github.com/nyaruka/ezconf v0.3.0
github.com/nyaruka/gocommon v1.54.7
github.com/nyaruka/gocommon v1.54.8
github.com/nyaruka/null/v3 v3.0.0
github.com/nyaruka/redisx v0.8.0
github.com/patrickmn/go-cache v2.1.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ github.com/naoina/toml v0.1.1 h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8=
github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
github.com/nyaruka/ezconf v0.3.0 h1:kGvJqVN8AHowb4HdaHAviJ0Z3yI5Pyekp1WqibFEaGk=
github.com/nyaruka/ezconf v0.3.0/go.mod h1:89GUW6EPRNLIxT7lC4LWnjWTgZeQwRoX7lBmc8ralAU=
github.com/nyaruka/gocommon v1.54.7 h1:4JhoPM6bs05HWzJOEoy9rLKuBfUaH06wN7rMN0CKOzg=
github.com/nyaruka/gocommon v1.54.7/go.mod h1:rWkEIpYIK98zL9Qm6PeMXJ+84WcWlArf01RfuWWCYvQ=
github.com/nyaruka/gocommon v1.54.8 h1:mYZNY2KRsxhUDDw7ULG/Mui2FfHwuYZB7a+Ronb/Xuk=
github.com/nyaruka/gocommon v1.54.8/go.mod h1:rWkEIpYIK98zL9Qm6PeMXJ+84WcWlArf01RfuWWCYvQ=
github.com/nyaruka/librato v1.1.1 h1:0nTYtJLl3Sn7lX3CuHsLf+nXy1k/tGV0OjVxLy3Et4s=
github.com/nyaruka/librato v1.1.1/go.mod h1:fme1Fu1PT2qvkaBZyw8WW+SrnFe2qeeCWpvqmAaKAKE=
github.com/nyaruka/null/v2 v2.0.3 h1:rdmMRQyVzrOF3Jff/gpU/7BDR9mQX0lcLl4yImsA3kw=
Expand Down
2 changes: 1 addition & 1 deletion handlers/rocketchat/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, errors.New("no text or attachment"))
}

urn, err := urns.NewFromParts(urns.RocketChat.Prefix, payload.User.URN, "", payload.User.Username)
urn, err := urns.NewFromParts(urns.RocketChat.Prefix, payload.User.URN, nil, payload.User.Username)
if err != nil {
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
}
Expand Down
2 changes: 1 addition & 1 deletion handlers/telegram/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
date := time.Unix(payload.Message.Date, 0).UTC()

// create our URN
urn, err := urns.NewFromParts(urns.Telegram.Prefix, strconv.FormatInt(payload.Message.From.ContactID, 10), "", strings.ToLower(payload.Message.From.Username))
urn, err := urns.NewFromParts(urns.Telegram.Prefix, strconv.FormatInt(payload.Message.From.ContactID, 10), nil, strings.ToLower(payload.Message.From.Username))
if err != nil {
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
}
Expand Down
2 changes: 1 addition & 1 deletion handlers/twitter/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (h *handler) receiveEvents(ctx context.Context, c courier.Channel, w http.R
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, fmt.Errorf("unable to find user for id: %s", senderID))
}

urn, err := urns.NewFromParts(urns.TwitterID.Prefix, user.ID, "", strings.ToLower(user.ScreenName))
urn, err := urns.NewFromParts(urns.TwitterID.Prefix, user.ID, nil, strings.ToLower(user.ScreenName))
if err != nil {
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, errors.New("invalid twitter id"))
}
Expand Down

0 comments on commit eeb5e34

Please sign in to comment.