-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow to specify a different URL base for Discord hook #11124
Comments
If we could figure it out if discord can resolve gitea's hostname and use ip or hostname based on this dessision it would not add more complexity or a simple option to "Ignore Hostname" witch would result in an embeds object with empty url fields? |
This is also an option, but I think if you can assign it individually, you can use e.g. pictures that you have uploaded on the internet. |
Sorry, where is this IP/hostname field located? Can you post an example request made with |
Much clear! Thanks. |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
It's applicable! |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
Ping |
[x]
):Description
problem
When I try to use a discord webhook, I always get a status code 400 with the body
{"embeds": ["0"]}
. Then I tried to analyze what this is due to.problem solving approach
I discussed this on the gitea discord server with @6543#1089. https://discordapp.com/channels/322538954119184384/357627248095789056/700457572599201855 then I asked @6543#1089 to try it on him, which worked fine, and send me the result. So header and body. Then I started to compare the two and found out that they only differ in ID and author/repo data. Then I made the requests manually with curl. His header with my body did not work. But my header with his body. So I compared the body and changed one line until I found the culprit, or three! Discord has a problem with hostnames. I had configured my gitea instance in app.ini to use hostnames. @6543#1089 on the other hand, specified the IP. So it worked for him. So I just entered something different in the three fields (
embeds[0].url
;embeds[0].author.url
andembeds[0].author.icon_url
) and tested it with curl, and see how it works.solution
So my idea would be, where you can enter the webhook url the username and the avatar url, just add three more fields for
embeds[0].url
;embeds[0].author.url
andembeds[0].author.icon_url
? So, that you can manually assign an url, an author url and author icon url, e.g. with a placeholder where the default values are already included.The text was updated successfully, but these errors were encountered: