Skip to content

Commit 29ce7cd

Browse files
committed
Update to latest gocommon
1 parent 8df7200 commit 29ce7cd

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/jmoiron/sqlx v1.4.0
1717
github.com/lib/pq v1.10.9
1818
github.com/nyaruka/ezconf v0.3.0
19-
github.com/nyaruka/gocommon v1.54.2
19+
github.com/nyaruka/gocommon v1.54.3
2020
github.com/nyaruka/null/v3 v3.0.0
2121
github.com/nyaruka/redisx v0.8.0
2222
github.com/patrickmn/go-cache v2.1.0+incompatible

Diff for: go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ github.com/naoina/toml v0.1.1 h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8=
7171
github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=
7272
github.com/nyaruka/ezconf v0.3.0 h1:kGvJqVN8AHowb4HdaHAviJ0Z3yI5Pyekp1WqibFEaGk=
7373
github.com/nyaruka/ezconf v0.3.0/go.mod h1:89GUW6EPRNLIxT7lC4LWnjWTgZeQwRoX7lBmc8ralAU=
74-
github.com/nyaruka/gocommon v1.54.2 h1:bJngg/Dhc6x01vq9lNMVc5YAh/nsAItd/xzbT83bASc=
75-
github.com/nyaruka/gocommon v1.54.2/go.mod h1:3rM5QdBU5YzFn/3KlDI0skPEghgssIS4WtLiji99JsA=
74+
github.com/nyaruka/gocommon v1.54.3 h1:NZx2hdVRFfvxW9ug5RY7XTNkrqbXW0w+o9mB5lJtv84=
75+
github.com/nyaruka/gocommon v1.54.3/go.mod h1:3rM5QdBU5YzFn/3KlDI0skPEghgssIS4WtLiji99JsA=
7676
github.com/nyaruka/librato v1.1.1 h1:0nTYtJLl3Sn7lX3CuHsLf+nXy1k/tGV0OjVxLy3Et4s=
7777
github.com/nyaruka/librato v1.1.1/go.mod h1:fme1Fu1PT2qvkaBZyw8WW+SrnFe2qeeCWpvqmAaKAKE=
7878
github.com/nyaruka/null/v2 v2.0.3 h1:rdmMRQyVzrOF3Jff/gpU/7BDR9mQX0lcLl4yImsA3kw=

Diff for: handlers/rocketchat/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
6969
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, errors.New("no text or attachment"))
7070
}
7171

72-
urn, err := urns.NewFromParts(urns.RocketChat, payload.User.URN, "", payload.User.Username)
72+
urn, err := urns.NewFromParts(urns.RocketChat.Prefix, payload.User.URN, "", payload.User.Username)
7373
if err != nil {
7474
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
7575
}

Diff for: handlers/telegram/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (h *handler) receiveMessage(ctx context.Context, channel courier.Channel, w
5858
date := time.Unix(payload.Message.Date, 0).UTC()
5959

6060
// create our URN
61-
urn, err := urns.NewFromParts(urns.Telegram, strconv.FormatInt(payload.Message.From.ContactID, 10), "", strings.ToLower(payload.Message.From.Username))
61+
urn, err := urns.NewFromParts(urns.Telegram.Prefix, strconv.FormatInt(payload.Message.From.ContactID, 10), "", strings.ToLower(payload.Message.From.Username))
6262
if err != nil {
6363
return nil, handlers.WriteAndLogRequestError(ctx, h, channel, w, r, err)
6464
}

Diff for: handlers/twitter/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (h *handler) receiveEvents(ctx context.Context, c courier.Channel, w http.R
167167
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, fmt.Errorf("unable to find user for id: %s", senderID))
168168
}
169169

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

0 commit comments

Comments
 (0)