Skip to content

[bug] A user deleting their own comment inside a linked discord issue causes the bot to delete the entire discord post #133

@4-9

Description

@4-9

As title

To reproduce,

  1. Create a new post in a discord forum
  2. Make a comment
  3. Delete the comment
Oct 12 09:42:45 app.example.com node[255999]: 10-12 09:42:45 [info]: discord->github | created | https://github.com/4-9/ExampleProject/issues/178
Oct 12 09:43:03 app.example.com node[255999]: 10-12 09:43:03 [info]: discord->github | commented | https://github.com/4-9/ExampleProject/issues/178
Oct 12 09:44:03 app.example.com node[255999]: 10-12 09:44:03 [info]: discord->github | deleted comment | https://github.com/4-9/ExampleProject/issues/178
Oct 12 09:44:04 app.example.com node[255999]: 10-12 09:44:04 [info]: github->discord | deleted | https://discord.com/channels/1234/5678/threads/999

The node app is proxied through nginx with a github webhook sending json without a secret

  location ^~ / {
    proxy_pass http://localhost:5000;
    proxy_http_version 1.1;

    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_host;
    proxy_set_header X-Request-Id $request_id;
    proxy_set_header CF_Ray $http_cf_ray;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions