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

IG unsent support #415

Merged
merged 4 commits into from
Feb 17, 2022
Merged

IG unsent support #415

merged 4 commits into from
Feb 17, 2022

Conversation

norkans7
Copy link
Contributor

@norkans7 norkans7 commented Feb 4, 2022

No description provided.

@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #415 (7d54d0f) into main (dbe5d13) will increase coverage by 0.00%.
The diff coverage is 76.92%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #415   +/-   ##
=======================================
  Coverage   71.89%   71.89%           
=======================================
  Files          95       95           
  Lines        8357     8370   +13     
=======================================
+ Hits         6008     6018   +10     
- Misses       1753     1755    +2     
- Partials      596      597    +1     
Impacted Files Coverage Δ
backend.go 20.00% <ø> (ø)
test.go 32.08% <0.00%> (-0.13%) ⬇️
backends/rapidpro/backend.go 67.01% <50.00%> (-0.18%) ⬇️
handlers/facebookapp/facebookapp.go 81.36% <100.00%> (+0.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbe5d13...7d54d0f. Read the comment docs.

@norkans7 norkans7 requested a review from rowanseymour February 4, 2022 11:10
@@ -142,6 +142,7 @@ type moPayload struct {
IsEcho bool `json:"is_echo"`
MID string `json:"mid"`
Text string `json:"text"`
IsDeleted string `json:"is_deleted"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this definitely correct according to their docs? I notice above that is_echo is an actual bool? Can go unmarshalling convert "true" to true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There they send a string as shown on the webhook events example

https://developers.facebook.com/docs/messenger-platform/instagram/features/webhook#webhook-events

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that's some impressively messy API design on their part

msgs_msg.id = (SELECT m."id" FROM "msgs_msg" m INNER JOIN "channels_channel" c ON (m."channel_id" = c."id") WHERE (c."uuid" = $1 AND m."external_id" = $2 AND m."direction" = 'I'))
RETURNING
msgs_msg.id
`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches the soft deletion by nyaruka/rapidpro#3681

@rowanseymour rowanseymour merged commit ce384c0 into main Feb 17, 2022
@rowanseymour rowanseymour deleted the IG-unsent branch February 17, 2022 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants