caoranach / DiscordConnect

This is a FoundryVTT module designed to mirror Foundry chat to a Discord channel.
5 stars 11 forks source link

Calls fail if avatar is not externally hosted #13

Closed nathonius closed 3 years ago

nathonius commented 3 years ago

If avatars are hosted on the foundry server, the calls to the discord API fail. For example:

{
  "username": "Gamemaster",
  "avatar_url": "http://icons/svg/mystery-man.svg",
  "content": "",
  "embeds": [{ "title": "", "description": "Rolled 1d20, and got a 1 = 1" }]
}
400 Bad Request
{
  "avatar_url": [
    "Not a well formed URL."
  ]
}

Obviously http://icons/svg/mystery-man.svg is not a valid URL.

EDIT: Oop, looks like this might already have been fixed? I see it in the changelog anyway.

Ah, looking at the code it uses the invite URL as its base, smart. Going to close this since setting that fixes it, this just needs to be documented.