Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master-rp to v5.7.14 #34

Merged
merged 75 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
e5c747d
Add loop protection by passing session history to new flow action tri…
rowanseymour Jul 21, 2020
c51d802
Add session_history as JSON field to flows_flowstart
rowanseymour Jul 23, 2020
e702a31
Update to latest goflow v0.96.0
rowanseymour Jul 23, 2020
1d6c99a
Wrap error message
rowanseymour Jul 23, 2020
0998f37
Merge pull request #321 from nyaruka/loop_protection
rowanseymour Jul 24, 2020
b0fb19a
Update CHANGELOG.md for v5.7.1
Jul 24, 2020
6e69b6f
Reorganize test
rowanseymour Jul 24, 2020
5da72e0
Update to latest goflow v0.97.0
rowanseymour Jul 27, 2020
2d0fbf3
Render rich errors with code and extra field
rowanseymour Jul 27, 2020
11d952f
Coverage
rowanseymour Jul 27, 2020
ff7eb03
Update to latest gofloe v0.98.0
rowanseymour Jul 28, 2020
f54d63e
Fix tests
rowanseymour Jul 28, 2020
8a9f51d
Merge pull request #324 from nyaruka/error_codes
rowanseymour Jul 29, 2020
0f6d81a
Update CHANGELOG.md for v5.7.2
Jul 29, 2020
2c91878
Update to goflow v0.99.0
rowanseymour Jul 30, 2020
b5d7820
Update CHANGELOG.md for v5.7.3
Jul 30, 2020
7de58bb
Refresh groups as well as fields for contact query parsing
rowanseymour Jul 30, 2020
d5fee3a
Merge pull request #325 from nyaruka/search_tweak
rowanseymour Jul 31, 2020
bf213f7
Fail outgoing messages for suspended orgs
rowanseymour Jul 31, 2020
2747a1b
Merge pull request #326 from nyaruka/fail_msgs_for_suspended
rowanseymour Jul 31, 2020
de69f5e
Update CHANGELOG.md for v5.7.4
Jul 31, 2020
40b4359
Update last_seen_on when we receive a message from a contact
rowanseymour Aug 3, 2020
eb7fdef
Merge pull request #327 from nyaruka/last_seen_on
rowanseymour Aug 4, 2020
5a4f7d6
Update last_seen_on when handling certain channel events
rowanseymour Aug 4, 2020
4ee8e9d
Include other events
rowanseymour Aug 5, 2020
0a689ca
Merge pull request #328 from nyaruka/last_seen_events
rowanseymour Aug 5, 2020
d470a5e
Last seen should be set as event times not db time
rowanseymour Aug 5, 2020
d868e11
Prevent accidently overwriting last_seen_on with older value
rowanseymour Aug 5, 2020
b5d06ba
Coverage
rowanseymour Aug 6, 2020
220ea8a
Merge pull request #329 from nyaruka/last_seen_tweaks
rowanseymour Aug 6, 2020
8f1524d
Update CHANGELOG.md for v5.7.5
Aug 6, 2020
a816300
Tweak test
rowanseymour Aug 6, 2020
56e96c3
Remove protection for overwriting last_seen_on with older values
rowanseymour Aug 6, 2020
5e07653
Merge pull request #330 from nyaruka/last_seen_tweak
rowanseymour Aug 6, 2020
14f5c25
Update CHANGELOG.md for v5.7.6
Aug 6, 2020
533f99d
Update to latest goflow v0.100.0
rowanseymour Aug 11, 2020
241ffde
Update CHANGELOG.md for v5.7.7
Aug 11, 2020
6e840f2
Recalculate event fires for campaign events based on last_seen_on in …
rowanseymour Aug 12, 2020
d9a62c9
Handle potential campaign event changes from handling inbox message
rowanseymour Aug 12, 2020
3a8f2eb
Fix comments
rowanseymour Aug 13, 2020
f7626af
Merge pull request #331 from nyaruka/last_seen_campaign_events
rowanseymour Aug 13, 2020
d785b6d
Update CHANGELOG.md for v5.7.8
Aug 13, 2020
b88d0ef
Bundle localized goflow docs in release
rowanseymour Aug 13, 2020
da92ca1
Merge pull request #332 from nyaruka/localized_docs
rowanseymour Aug 13, 2020
134b4ca
Update to goflow v0.101.2
rowanseymour Aug 13, 2020
962be78
Update CHANGELOG.md for v5.7.9
Aug 13, 2020
e915549
Tweak goreleaser config to include subdirectories inside docs folder
rowanseymour Aug 13, 2020
fbbdc3c
Update CHANGELOG.md for v5.7.10
Aug 13, 2020
b54a8ad
Convert IVR code to use goflow's httpx package
rowanseymour Aug 12, 2020
f8dc5d0
Merge pull request #335 from nyaruka/use_httpx
rowanseymour Aug 17, 2020
6dfbee6
Update to latest goflow v0.102.0
rowanseymour Aug 18, 2020
3d503b3
Always write contact.status when writing is_blocked or is_stopped
rowanseymour Aug 19, 2020
2141671
Merge pull request #337 from nyaruka/contact_status_pt1
rowanseymour Aug 20, 2020
c372903
Update CHANGELOG.md for v5.7.11
Aug 20, 2020
5dc6569
WIP
rowanseymour Aug 19, 2020
d0e594f
Abstract S3 code so tests and dev envs can use file storage
rowanseymour Aug 20, 2020
b3467c3
Use path/filepath instead of path
rowanseymour Aug 20, 2020
9a5dc88
Fix inserting channel logs and add test
rowanseymour Aug 21, 2020
ce5c088
Merge pull request #340 from nyaruka/channel_log_fix
rowanseymour Aug 21, 2020
75e6ecd
Update CHANGELOG.md for v5.7.12
Aug 21, 2020
f61bf68
Move StoreAttachment into org class
rowanseymour Aug 21, 2020
d6fd6e1
Merge pull request #339 from nyaruka/storage
rowanseymour Aug 21, 2020
216a43b
Move some packages into utils/
rowanseymour Aug 21, 2020
95d22b4
Merge branch 'master' into zendesk_files
rowanseymour Aug 21, 2020
1507e86
Implement saving of zendesk ticket files as attachments
rowanseymour Aug 21, 2020
0a6917e
Merge pull request #341 from nyaruka/zendesk_files
rowanseymour Aug 21, 2020
94eb7ed
Read from contact.status intead of is_stopped/is_blocked
rowanseymour Aug 24, 2020
1c86ee8
Add test
rowanseymour Aug 24, 2020
809f3b9
Merge pull request #342 from nyaruka/contact_status_pt2
rowanseymour Aug 25, 2020
286acd1
Update CHANGELOG.md for v5.7.13
Aug 25, 2020
035b0d7
Stop writing is_blocked and is_stopped
rowanseymour Aug 25, 2020
3f5f1d2
Merge pull request #343 from nyaruka/contact_status_pt3
rowanseymour Aug 25, 2020
df920c0
Update CHANGELOG.md for v5.7.14
Aug 25, 2020
e3dde2b
Merge branch 'master-rp' into update-rp/v5.7.14
koallann Nov 4, 2020
9efcb07
Update Dockerfile
Nov 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:
uses: actions/checkout@v1

- name: Fetch GoFlow docs
# for now just grab en_US/ docs and bundle as docs/
# for backward compatibility, English docs are copied to root of docs directory
run: |
GOFLOW_VERSION=$(grep goflow go.mod | cut -d" " -f2)
curl https://codeload.github.com/nyaruka/goflow/tar.gz/$GOFLOW_VERSION | tar --wildcards --strip=2 -zx "*/docs/en_US/*"
mv en_US docs
GOFLOW_VERSION=$(grep goflow go.mod | cut -d" " -f2 | cut -c2-)
curl https://codeload.github.com/nyaruka/goflow/tar.gz/v$GOFLOW_VERSION | tar --wildcards --strip=1 -zx "goflow-${GOFLOW_VERSION}/docs/*"
cp ./docs/en-us/*.* docs/

- name: Install Go
uses: actions/setup-go@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docs/*
docs

.DS_Store
_storage/

# Test binary, build with `go test -c`
*.test
Expand Down
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
v5.7.14
----------
* Stop writing is_blocked and is_stopped

v5.7.13
----------
* Read from contact.status intead of is_stopped/is_blocked
* Implement saving of zendesk ticket files as attachments
* Abstract S3 code so tests and dev envs can use file storage

v5.7.12
----------
* Fix inserting channel logs and add test

v5.7.11
----------
* Always write contact.status when writing is_blocked or is_stopped
* Convert IVR code to use goflow's httpx package

v5.7.10
----------
* Tweak goreleaser config to include subdirectories inside docs folder

v5.7.9
----------
* Update to goflow v0.101.2
* Bundle localized goflow docs in release

v5.7.8
----------
* Recalculate event fires for campaign events based on last_seen_on

v5.7.7
----------
* Update to latest goflow v0.100.0

v5.7.6
----------
* Remove protection for overwriting last_seen_on with older values

v5.7.5
----------
* Update last_seen_on when handling certain channel events
* Update last_seen_on when we receive a message from a contact

v5.7.4
----------
* Fail outgoing messages for suspended orgs
* Refresh groups as well as fields for contact query parsing

v5.7.3
----------
* Update to goflow v0.99.0

v5.7.2
----------
* Update to latest goflow v0.98.0
* Render rich errors with code and extra field

v5.7.1
----------
* Update to latest goflow v0.96.0
* Add loop protection by passing session history to new flow action triggers

v5.7.0
----------
* Set user and origin on manual triggers
Expand Down
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ func NewMailroomConfig() *Config {
S3MediaPrefix: "/media/",
S3DisableSSL: false,
S3ForcePathStyle: false,
AWSAccessKeyID: "missing_aws_access_key_id",
AWSSecretAccessKey: "missing_aws_secret_access_key",
AWSAccessKeyID: "",
AWSSecretAccessKey: "",

RetryPendingMessages: true,

Expand Down
4 changes: 2 additions & 2 deletions courier/courier.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func QueueMessages(rc redis.Conn, msgs []*models.Msg) error {
}

for _, msg := range msgs {
// no channel, continue
if msg.ChannelUUID() == "" {
// ignore any message without a channel or already marked as failed (maybe org is suspended)
if msg.ChannelUUID() == "" || msg.Status() == models.MsgStatusFailed {
continue
}

Expand Down
168 changes: 168 additions & 0 deletions courier/courier_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
package courier_test

import (
"encoding/json"
"fmt"
"testing"
"time"

"github.com/nyaruka/gocommon/urns"
"github.com/nyaruka/goflow/assets"
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/mailroom/courier"
"github.com/nyaruka/mailroom/models"
"github.com/nyaruka/mailroom/testsuite"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

type msgSpec struct {
ChannelUUID assets.ChannelUUID
Text string
ContactID models.ContactID
URN urns.URN
URNID models.URNID
Failed bool
}

func createMsg(t *testing.T, m msgSpec) *models.Msg {
ctx := testsuite.CTX()
db := testsuite.DB()
db.MustExec(`UPDATE orgs_org SET is_suspended = $1 WHERE id = $2`, m.Failed, models.Org1)

oa, err := models.GetOrgAssetsWithRefresh(ctx, db, models.Org1, models.RefreshOrg)
require.NoError(t, err)

channel := oa.ChannelByUUID(m.ChannelUUID)

flowMsg := flows.NewMsgOut(m.URN, channel.ChannelReference(), m.Text, nil, nil, nil, flows.NilMsgTopic)
msg, err := models.NewOutgoingMsg(oa.Org(), channel, m.ContactID, flowMsg, time.Now())
require.NoError(t, err)
return msg
}

func TestQueueMessages(t *testing.T) {
db := testsuite.DB()
rc := testsuite.RC()
testsuite.Reset()
models.FlushCache()

// convert the Twitter channel to be an Android channel
db.MustExec(`UPDATE channels_channel SET name = 'Android', channel_type = 'A' WHERE id = $1`, models.TwitterChannelID)
androidChannelUUID := models.TwitterChannelUUID

tests := []struct {
Description string
Msgs []msgSpec
QueueSizes map[string]int
}{
{
Description: "2 queueable messages",
Msgs: []msgSpec{
{
ChannelUUID: models.TwilioChannelUUID,
Text: "normal msg 1",
ContactID: models.CathyID,
URN: urns.URN(fmt.Sprintf("tel:+250700000001?id=%d", models.CathyURNID)),
URNID: models.CathyURNID,
},
{
ChannelUUID: models.TwilioChannelUUID,
Text: "normal msg 2",
ContactID: models.CathyID,
URN: urns.URN(fmt.Sprintf("tel:+250700000001?id=%d", models.CathyURNID)),
URNID: models.CathyURNID,
},
},
QueueSizes: map[string]int{
"msgs:74729f45-7f29-4868-9dc4-90e491e3c7d8|10/0": 2,
},
},
{
Description: "1 queueable message and 1 failed",
Msgs: []msgSpec{
{
ChannelUUID: models.TwilioChannelUUID,
Text: "normal msg 1",
ContactID: models.CathyID,
URN: urns.URN(fmt.Sprintf("tel:+250700000001?id=%d", models.CathyURNID)),
URNID: models.CathyURNID,
Failed: true,
},
{
ChannelUUID: models.TwilioChannelUUID,
Text: "normal msg 1",
ContactID: models.CathyID,
URN: urns.URN(fmt.Sprintf("tel:+250700000001?id=%d", models.CathyURNID)),
URNID: models.CathyURNID,
},
},
QueueSizes: map[string]int{
"msgs:74729f45-7f29-4868-9dc4-90e491e3c7d8|10/0": 1,
},
},
{
Description: "1 queueable message and 1 Android",
Msgs: []msgSpec{
{
ChannelUUID: androidChannelUUID,
Text: "normal msg 1",
ContactID: models.CathyID,
URN: urns.URN(fmt.Sprintf("tel:+250700000001?id=%d", models.CathyURNID)),
URNID: models.CathyURNID,
},
{
ChannelUUID: models.TwilioChannelUUID,
Text: "normal msg 1",
ContactID: models.CathyID,
URN: urns.URN(fmt.Sprintf("tel:+250700000001?id=%d", models.CathyURNID)),
URNID: models.CathyURNID,
},
},
QueueSizes: map[string]int{
"msgs:74729f45-7f29-4868-9dc4-90e491e3c7d8|10/0": 1,
},
},
{
Description: "0 messages",
Msgs: []msgSpec{},
QueueSizes: map[string]int{
"msgs:74729f45-7f29-4868-9dc4-90e491e3c7d8|10/0": 0,
},
},
}

for _, tc := range tests {
msgs := make([]*models.Msg, len(tc.Msgs))
for i := range tc.Msgs {
msgs[i] = createMsg(t, tc.Msgs[i])
}

rc.Do("FLUSHDB")
courier.QueueMessages(rc, msgs)

for queueKey, size := range tc.QueueSizes {
if size == 0 {
result, err := rc.Do("ZCARD", queueKey)
require.NoError(t, err)
assert.Equal(t, size, int(result.(int64)))
} else {
result, err := rc.Do("ZPOPMAX", queueKey)
require.NoError(t, err)

results := result.([]interface{})
assert.Equal(t, 2, len(results)) // result is (item, score)

batchJSON := results[0].([]byte)
var batch []map[string]interface{}
err = json.Unmarshal(batchJSON, &batch)
require.NoError(t, err)

assert.Equal(t, size, len(batch))
}
}
}

testsuite.Reset()
}
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN addgroup -S golang \

COPY . .

RUN curl https://codeload.github.com/nyaruka/goflow/tar.gz/$(grep goflow go.mod | cut -d" " -f2) | tar --wildcards --strip=1 -zx "*/docs/*"
RUN cp docs/en_US/completion.json docs/completion.json && cp docs/en_US/functions.json docs/functions.json
RUN export GOFLOW_VERSION=$(grep goflow go.mod | cut -d" " -f2 | cut -c2-) && curl https://codeload.github.com/nyaruka/goflow/tar.gz/v$GOFLOW_VERSION | tar --wildcards --strip=1 -zx "goflow-${GOFLOW_VERSION}/docs/*"
RUN cp ./docs/en-us/*.* docs/

RUN go install -v ./cmd/...

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ require (
github.com/lib/pq v1.4.0
github.com/mattn/go-sqlite3 v1.10.0 // indirect
github.com/nyaruka/ezconf v0.2.1
github.com/nyaruka/gocommon v1.2.0
github.com/nyaruka/goflow v0.95.1
github.com/nyaruka/gocommon v1.3.0
github.com/nyaruka/goflow v0.102.1
github.com/nyaruka/librato v1.0.0
github.com/nyaruka/logrus_sentry v0.8.2-0.20190129182604-c2962b80ba7d
github.com/nyaruka/null v1.2.0
Expand All @@ -28,7 +28,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.9.1
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24
github.com/shopspring/decimal v1.2.0
github.com/sirupsen/logrus v1.5.0
github.com/stretchr/testify v1.5.1
gopkg.in/go-playground/validator.v9 v9.31.0
Expand Down
13 changes: 6 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ 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.2.1 h1:TDXWoqjqYya1uhou1mAJZg7rgFYL98EB0Tb3+BWtUh0=
github.com/nyaruka/ezconf v0.2.1/go.mod h1:ey182kYkw2MIi4XiWe1FR/mzI33WCmTWuceDYYxgnQw=
github.com/nyaruka/gocommon v1.2.0 h1:gCmVCXYZFwKDMqQj8R1jNlK+7a06khKFq3zX8fBBbzw=
github.com/nyaruka/gocommon v1.2.0/go.mod h1:9Y21Fd6iZXDLHWTRiZAc6b4LQSCi6HEEQK4SB45Yav4=
github.com/nyaruka/goflow v0.95.1 h1:FmYlZH4+mM+5Xft1BxUG97TIWx4eDqZk0Dbnh86Qqs4=
github.com/nyaruka/goflow v0.95.1/go.mod h1:ttUI9hd9ufGU/3EqIst6Hdc68imMG1utlqcELbYrtOQ=
github.com/nyaruka/gocommon v1.3.0 h1:IqaPT4KQ2oVq/2Ivp/c+RVCs8v71+RzPU2VhMoRrgpU=
github.com/nyaruka/gocommon v1.3.0/go.mod h1:w7lKxIkm/qLAoO9Y3aI1LV7EiYogn6+1C8MTEjxTC9M=
github.com/nyaruka/goflow v0.102.1 h1:7QX2jTwV7uIbaGnkkpmB+ao+E7Cmyar9g7sRQH4Bu3M=
github.com/nyaruka/goflow v0.102.1/go.mod h1:wuvXZTs6a6S1rjSRLaQGVxDfKomDJ/1XQoLXCqFekK4=
github.com/nyaruka/librato v1.0.0 h1:Vznj9WCeC1yZXbBYyYp40KnbmXLbEkjKmHesV/v2SR0=
github.com/nyaruka/librato v1.0.0/go.mod h1:pkRNLFhFurOz0QqBz6/DuTFhHHxAubWxs4Jx+J7yUgg=
github.com/nyaruka/logrus_sentry v0.8.2-0.20190129182604-c2962b80ba7d h1:hyp9u36KIwbTCo2JAJ+TuJcJBc+UZzEig7RI/S5Dvkc=
Expand Down Expand Up @@ -170,9 +170,8 @@ github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shopspring/decimal v0.0.0-20180319170823-2df3e6ddaf6e/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
Expand Down
2 changes: 1 addition & 1 deletion goflow/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net/http"
"testing"

"github.com/nyaruka/gocommon/httpx"
"github.com/nyaruka/gocommon/urns"
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/goflow/utils/httpx"
"github.com/nyaruka/mailroom/goflow"
"github.com/nyaruka/mailroom/models"
"github.com/nyaruka/mailroom/testsuite"
Expand Down
2 changes: 1 addition & 1 deletion goflow/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/nyaruka/goflow/utils/httpx"
"github.com/nyaruka/gocommon/httpx"
"github.com/nyaruka/mailroom/config"
)

Expand Down
2 changes: 1 addition & 1 deletion goflow/modifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/nyaruka/goflow/assets"
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/goflow/flows/actions/modifiers"
"github.com/nyaruka/goflow/flows/modifiers"

"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ archives:
- files:
- LICENSE
- README.md
- docs/*
- docs/**/*
2 changes: 1 addition & 1 deletion hooks/airtime_transferred_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"strings"
"testing"

"github.com/nyaruka/gocommon/httpx"
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/goflow/flows/actions"
"github.com/nyaruka/goflow/utils/httpx"
"github.com/nyaruka/mailroom/models"
"github.com/nyaruka/mailroom/testsuite"

Expand Down
4 changes: 4 additions & 0 deletions hooks/campaigns.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func (h *UpdateCampaignEventsHook) Apply(ctx context.Context, tx *sqlx.Tx, rp *r
continue
}
fieldChanges[field.ID()] = true

case *events.MsgReceivedEvent:
field := oa.FieldByKey(models.LastSeenOnKey)
fieldChanges[field.ID()] = true
}
}

Expand Down
Loading