Some messages without line feed and disable page preview in Telegram Webhook #3212

Open
opened 2025-11-02 05:04:02 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @InExtremaRes on GitHub (Apr 19, 2019).

  • Gitea version (or commit ref): b9d1fb6
  • Operating system: Docker
    (rest is irrelevant)

Description

First of all thank you @techknowlogick for #4227. I found some issues and suggestion for the message.

As you can see here

image

when someone comments an issue the bot message doesn't have a new line before the content. Same with comments for a PR. I haven't tested every message to see if this happens elsewhere.

EDIT:
PR #6719 fixes the page preview of the messages (description below) but the line feed in some messages (description above) is still missing.


Also in Telegram, by default a message sent that includes a link will put a preview of the web, a little header and description. I think for the main purpose users want this feature (notifications of events) it is just noise. You can see what I mean here:

image

The method sendMessage in telegram bot API includes a parameter disable_web_page_preview that could be set to false. I think this should be false by default, maybe with an option to enable it.

Originally created by @InExtremaRes on GitHub (Apr 19, 2019). - Gitea version (or commit ref): b9d1fb6 - Operating system: Docker (rest is irrelevant) ## Description First of all thank you @techknowlogick for #4227. I found some issues and suggestion for the message. As you can see here ![image](https://user-images.githubusercontent.com/1635491/56441657-d1d03380-62bb-11e9-96aa-0f0db721237e.png) when someone comments an issue the bot message doesn't have a new line before the content. Same with comments for a PR. I haven't tested every message to see if this happens elsewhere. **EDIT:** PR #6719 fixes the page preview of the messages (description below) but the line feed in some messages (description above) is still missing. *** Also in Telegram, by default a message sent that includes a link will put a preview of the web, a little header and description. I think for the main purpose users want this feature (notifications of events) it is just noise. You can see what I mean here: ![image](https://user-images.githubusercontent.com/1635491/56441869-76527580-62bc-11e9-8b64-31024d69e4ba.png) The method [sendMessage](https://core.telegram.org/bots/api#sendmessage) in telegram bot API includes a parameter `disable_web_page_preview` that could be set to `false`. I think this should be `false` by default, maybe with an option to enable it.
GiteaMirror added the issue/confirmedtype/enhancement labels 2025-11-02 05:04:02 -06:00
Author
Owner

@techknowlogick commented on GitHub (Apr 19, 2019):

@InExtremaRes I've just sent a PR to disable previews, as you are right it'll be the same everytime and will just take up unnecessary space.

Please check if #6683 works for you.

@techknowlogick commented on GitHub (Apr 19, 2019): @InExtremaRes I've just sent a PR to disable previews, as you are right it'll be the same everytime and will just take up unnecessary space. Please check if #6683 works for you.
Author
Owner

@lafriks commented on GitHub (Apr 25, 2019):

Should be fixed by #6719 if not please reopen

@lafriks commented on GitHub (Apr 25, 2019): Should be fixed by #6719 if not please reopen
Author
Owner

@InExtremaRes commented on GitHub (Apr 25, 2019):

@lafriks In fact, as you can see in the comments of #6683, #6719 only fixes the page preview but no the line feeds missing. I can reopen and edit the issue to reflect that fact, or should I open a new issue instead?

@InExtremaRes commented on GitHub (Apr 25, 2019): @lafriks In fact, as you can see in the comments of #6683, #6719 only fixes the page preview but no the line feeds missing. I can reopen and edit the issue to reflect that fact, or should I open a new issue instead?
Author
Owner

@lafriks commented on GitHub (Apr 25, 2019):

Please update description what still needs to be done

@lafriks commented on GitHub (Apr 25, 2019): Please update description what still needs to be done
Author
Owner

@InExtremaRes commented on GitHub (Apr 27, 2019):

I edited de issue but I am not sure it is enough. Feel free to edit the title or the content to help to track the issue better.

@InExtremaRes commented on GitHub (Apr 27, 2019): I edited de issue but I am not sure it is enough. Feel free to edit the title or the content to help to track the issue better.
Author
Owner

@stale[bot] commented on GitHub (Aug 24, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 24, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@Mikaela commented on GitHub (Aug 24, 2019):

Does this issue include the issue and code previews being a lot more unhelpful than at GitHub?

Screenshot from 2019-08-24 12-55-10

Screenshot from 2019-08-24 12-56-41

as opposed to

Screenshot from 2019-08-24 12-59-15

@Mikaela commented on GitHub (Aug 24, 2019): Does this issue include the issue and code previews being a lot more unhelpful than at GitHub? ![Screenshot from 2019-08-24 12-55-10](https://user-images.githubusercontent.com/831184/63635732-91136d00-c655-11e9-90e2-767ff55d1f20.png) ![Screenshot from 2019-08-24 12-56-41](https://user-images.githubusercontent.com/831184/63635733-940e5d80-c655-11e9-9ce0-90aba083224f.png) as opposed to ![Screenshot from 2019-08-24 12-59-15](https://user-images.githubusercontent.com/831184/63635757-e0599d80-c655-11e9-9a81-804bcaf970c6.png)
Author
Owner

@stale[bot] commented on GitHub (Oct 23, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Oct 23, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@Mikaela commented on GitHub (Oct 27, 2019):

I am able to reproduce my previous comment of which beimng this issue was never confirmed?

@Mikaela commented on GitHub (Oct 27, 2019): I am able to reproduce my previous comment of which beimng this issue was never confirmed?
Author
Owner

@stale[bot] commented on GitHub (Dec 26, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Dec 26, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@Mikaela commented on GitHub (Dec 27, 2019):

I am still able to reproduce, however the Gitea instance is outdated which cannot be helped at the moment and I think next time I will just open a new issue as my previous comment leave it unclear if this is even my issue.

@Mikaela commented on GitHub (Dec 27, 2019): I am still able to reproduce, however the Gitea instance is outdated which cannot be helped at the moment and I think next time I will just open a new issue as my previous comment leave it unclear if this is even my issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3212