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

Support sending and receiving stickers for WAC and D3C #610

Closed
wants to merge 8 commits into from

Conversation

norkans7
Copy link
Contributor

@norkans7 norkans7 commented Jul 28, 2023

This adds support to send and receive stickers as documented on https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types

The file need to be for format image/webp and size less than 100KB or 500KB for animated one with dimensions not exceeding 512x512

@norkans7 norkans7 force-pushed the support-WAC-stickers branch from 7e20fe4 to 1847a76 Compare July 28, 2023 13:19
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.61%. Comparing base (ff06bf4) to head (ba7fa36).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #610      +/-   ##
==========================================
+ Coverage   74.57%   74.61%   +0.03%     
==========================================
  Files         110      110              
  Lines       13280    13290      +10     
==========================================
+ Hits         9904     9916      +12     
+ Misses       2664     2662       -2     
  Partials      712      712              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rowanseymour
Copy link
Member

@norkans7 since this isn't a bug gonna hold off merging until after release

@@ -621,7 +632,9 @@ func (h *handler) Send(ctx context.Context, msg courier.Msg, clog *courier.Chann

} else if i < len(msg.Attachments()) && (len(qrs) == 0 || len(qrs) > 3) {
attType, attURL := handlers.SplitAttachment(msg.Attachments()[i])
attType = strings.Split(attType, "/")[0]
splitedAttType := strings.Split(attType, "/")
Copy link
Member

Choose a reason for hiding this comment

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

@norkans7 how about we rework this to call resolve media and then we can also check that the image is 512 x 512 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll update that

@norkans7 norkans7 force-pushed the support-WAC-stickers branch from 1847a76 to fd6068d Compare September 5, 2023 13:10
@norkans7
Copy link
Contributor Author

norkans7 commented Sep 5, 2023

contains #624

@norkans7 norkans7 force-pushed the support-WAC-stickers branch from fd6068d to ef2015f Compare September 6, 2023 15:19
@norkans7 norkans7 force-pushed the support-WAC-stickers branch from ef2015f to dc47057 Compare April 22, 2024 22:11
@norkans7
Copy link
Contributor Author

This branch is out of date I will rework on that again

@norkans7 norkans7 force-pushed the support-WAC-stickers branch from dc47057 to ba7fa36 Compare April 23, 2024 13:37
@norkans7 norkans7 mentioned this pull request Apr 23, 2024
@norkans7 norkans7 closed this Apr 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants