Skip to content

Incomplete message text in telegram notifications (via webhook) #26371

Closed
@POPSuL

Description

@POPSuL

Description

I have telegram webhook for all events from * branches.
If I assign someone to review a pull request, I receive message by popsul (where popsul is link to my gitea page).
In the resent deliveries I see next (sensitive data was hidden):

Request:

Request URL: https://api.telegram.org/bot***/sendMessage?chat_id=-***
Request method: POST
Content-Type: application/json
X-GitHub-Delivery: ee2c1c0c-8b51-4bc5-8e7c-bc47a4527178
X-GitHub-Event: pull_request
X-GitHub-Event-Type: pull_request_review_request
X-Gitea-Delivery: ee2c1c0c-8b51-4bc5-8e7c-bc47a4527178
X-Gitea-Event: pull_request
X-Gitea-Event-Type: pull_request_review_request
X-Gitea-Signature: 
X-Gogs-Delivery: ee2c1c0c-8b51-4bc5-8e7c-bc47a4527178
X-Gogs-Event: pull_request
X-Gogs-Event-Type: pull_request_review_request
X-Gogs-Signature: 
X-Hub-Signature: sha1=
X-Hub-Signature-256: sha256=

Content:

{
  "text": "by \u003ca href=\"https://***/popsul\" rel=\"nofollow\"\u003epopsul\u003c/a\u003e",
  "parse_mode": "HTML",
  "disable_web_page_preview": true
}

Gitea Version

1.20.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

CentOS 8, self hosted.
Gitea binary from github releases page.
Started via systemd:

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
# If you want to bind Gitea to a port below 1024 uncomment
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

Database

MySQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions