-
-
Notifications
You must be signed in to change notification settings - Fork 16
Switch replies to rich text #513
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
251eefb
Log starting tests
rob93c a2fae00
Configure placeholder message when a file needs to be processed
rob93c 798df48
Rework integration tests to be able to check on rich messages
rob93c e2e12d9
Add email information in privacy policy answer
rob93c b69ad30
Configure new answer to show currently supported formats
rob93c d31d994
Simplify supported answer and turned off reply to message for text-on…
rob93c 23663dd
Fix answerWithFile flow
rob93c 729bb6f
Align supported files information across answers
rob93c 78b26ba
Move file conversion confirmation after sendDocument API call
rob93c 2dc85b0
Fix integration tests after API call order changes
rob93c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,60 +6,65 @@ | |
| public enum Answer { | ||
|
|
||
| HELP(""" | ||
| Send me the media you want to convert and I will take care of the rest\\. | ||
| Send me the media you want to convert and I will take care of the rest. | ||
|
|
||
| Based on what you send, I will answer the following: | ||
| \\- the converted media, if you sent a supported file \\(images, gifs, standard and video stickers are supported\\) | ||
| \\- no file, if you sent a media already suiting Telegram's requirements | ||
| \\- an error message, if you sent either an unsupported or a corrupted file | ||
| \\- an informative message for any message without a file | ||
| - the converted media, if you sent a supported file (use the **/supported** command to read the full list) | ||
| - no file, if you sent a media already suiting Telegram's requirements | ||
| - an error message, if you sent either an unsupported or a corrupted file | ||
| - an informative message for any message without a file | ||
|
|
||
| Once the file is ready, head to [Stickers](https://t.me/Stickers) to create a new sticker\\. | ||
| Once the file is ready, head to [Stickers bot](https://t.me/Stickers) to create a new sticker. | ||
| """), | ||
| FILE_READY(""" | ||
| Your sticker file is ready\\! | ||
| Head to [Stickers](https://t.me/Stickers) to create a new sticker\\. | ||
| Your sticker file is ready! | ||
|
|
||
| Head to [Stickers bot](https://t.me/Stickers) to create a new sticker. | ||
| """), | ||
| FILE_ALREADY_VALID(""" | ||
| The media you sent was already suitable to be a Telegram sticker\\. | ||
| Send it to [Stickers](https://t.me/Stickers) to add it as a new sticker\\. | ||
| The media you sent was already suitable to be a Telegram sticker. | ||
| Send it to [Stickers bot](https://t.me/Stickers) to add it as a new sticker. | ||
| """), | ||
| FILE_TOO_LARGE(""" | ||
| The file can't be converted because Telegram bots can't handle files larger than 20 MB at the moment: please send a smaller one\\. | ||
| The file can't be converted because Telegram bots can't handle files larger than 20 MB at the moment: please send a smaller one. | ||
| """), | ||
| ABOUT(""" | ||
| This bot is open source, check it out on [Github](https://github.com/Stickerifier/Stickerify)\\. | ||
| This bot is open source, check it out on [GitHub](https://github.com/Stickerifier/Stickerify). | ||
|
|
||
| Looking for sticker packs? Try [MeminiCustom](https://t.me/addstickers/MeminiCustom) and [VideoMemini](https://t.me/addstickers/VideoMemini)\\! | ||
| Looking for sticker packs? Try [MeminiCustom](https://t.me/addstickers/MeminiCustom) and [VideoMemini](https://t.me/addstickers/VideoMemini)! | ||
| """), | ||
| ERROR(""" | ||
| The file conversion was unsuccessful: only images, gifs, standard and video stickers are supported\\. | ||
| The file conversion was unsuccessful: use the **/supported** command to read the full list of supported files. | ||
|
|
||
| If you think it should have worked, please report the issue on [Github](https://github.com/Stickerifier/Stickerify/issues/new/choose)\\. | ||
| """, true), | ||
| If you think it should have worked, please report the issue on [GitHub](https://github.com/Stickerifier/Stickerify/issues/new/choose). | ||
| """), | ||
| PRIVACY_POLICY(""" | ||
| You can view our privacy policy by visiting [this link](https://stickerifier.github.io/Stickerify/PRIVACY_POLICY.html)\\. | ||
| You can view our privacy policy by visiting [this link](https://stickerifier.github.io/Stickerify/PRIVACY_POLICY.html). | ||
|
|
||
| If you have any questions or concerns, feel free to reach out to us at [[email protected]](mailto:[email protected]). | ||
| """), | ||
| PROCESSING(""" | ||
| <tg-thinking>Processing file...</tg-thinking> | ||
| """), | ||
| SUPPORTED_FORMATS(""" | ||
| | Type | Supported formats | | ||
| |:---------|:------------------------------------------------| | ||
| | images | png, jpg, static webp, tiff, ico, svg, psd | | ||
| | videos | gif, mov, avi, mp4, webm, m4v, mkv, live photos | | ||
| | stickers | static, video, animated | | ||
|
|
||
| If you have any questions or concerns, feel free to reach out to us\\. | ||
| --- | ||
|
|
||
| If you want to see a format added, please let us know by creating an issue on [GitHub](https://github.com/Stickerifier/Stickerify/issues/new). | ||
| """); | ||
|
|
||
| private final String text; | ||
| private final boolean disableLinkPreview; | ||
|
|
||
| Answer(String text) { | ||
| this(text, false); | ||
| } | ||
|
|
||
| Answer(String text, boolean disableLinkPreview) { | ||
| this.text = text; | ||
| this.disableLinkPreview = disableLinkPreview; | ||
| } | ||
|
|
||
| public String getText() { | ||
| return text; | ||
| } | ||
|
|
||
| public boolean isDisableLinkPreview() { | ||
| return disableLinkPreview; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.