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

Improve attachment handling #1928

Merged
merged 3 commits into from Nov 26, 2022
Merged

Conversation

ilmaisin
Copy link
Contributor

@ilmaisin ilmaisin commented Nov 24, 2022

Closes #1469

}

// Post a video message from the bridge to WhatsApp
func (b *Bwhatsapp) PostVideoMessage(msg config.Message, filetype string) (string, error) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Nov 24, 2022

Code Climate has analyzed commit 1dcdac6 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

View more on Code Climate.

@ilmaisin
Copy link
Contributor Author

I could merge those video, audio, document and picture functions. With regards to the audio messages, maybe the contents of the ogg file should be examined in order to make sure it is really an OPUS audio file.

@ilmaisin ilmaisin marked this pull request as ready for review November 26, 2022 21:43
@42wim 42wim added the whatsapp label Nov 26, 2022
@42wim 42wim added this to the 1.26.0 milestone Nov 26, 2022
@42wim
Copy link
Owner

42wim commented Nov 26, 2022

LGTM, a follow-up PR for the opus would be nice :)
Thanks ! 👍

@42wim 42wim merged commit 0a6d64a into 42wim:master Nov 26, 2022
@ilmaisin
Copy link
Contributor Author

Closes #1469.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline media in WhatsApp
2 participants