Skip to content

Textless footers in embeds are rejected #1578

@illyria2763

Description

@illyria2763

Describe the bug
Codeberg fails to post commit logs to a webhook because the server doesn't accept messages with embeds that have empty footers

To Reproduce
Steps to reproduce the behavior:

  1. Create webhook
  2. Connect it to a repository on codeberg
  3. Do anything that triggers a message on it (committing or anything according to what you configured)
  4. Server rejects

Expected behavior
A clear and concise description of what you expected to happen.

Codeberg reports the response even when it's an error, so here's some proof directly from it

{"code":50035,"message":"Invalid Form Body","errors":{"embeds/0/footer":{"_errors":[{"message":"must have required property 'text'","code":"required"}]}},"_ajvErrors":[{"instancePath":"/embeds/0/footer","schemaPath":"#/properties/footer/required","keyword":"required","params":{"missingProperty":"text"},"message":"must have required property 'text'"}],"request":"POST /api/v9/webhooks/1475144322917908557/webhooktokenlol"}

Here's what it sent at all:

{ "username": "Codeberg", "avatar_url": "https://design.codeberg.org/logo-kit/icon_inverted.svg", "embeds": [ { "title": "[synthstitches/Sillies:main] 1 new commit", "description": "[d8c2576](https://codeberg.org/synthstitches/Sillies/commit/d8c25764a550d546b6b11b5adbc932355a6189d4) add signing up\n - synthstitches", "url": "https://codeberg.org/synthstitches/Sillies/commit/d8c25764a550d546b6b11b5adbc932355a6189d4", "color": 1754624, "footer": {}, "author": { "name": "synthstitches", "url": "https://codeberg.org/synthstitches", "icon_url": "https://codeberg.org/avatars/7003ed7e743064ada6e382ab19e2160d82184c3ff7f0daf06d3b1c9a5f06d341" } } ] }

Tested on Spacebar Staging Official.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions