mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 01:00:12 +00:00
Fix proxying messages with no avatar set
This commit is contained in:
parent
90ae1de19e
commit
f16dd460ec
1 changed files with 2 additions and 1 deletions
|
|
@ -63,6 +63,7 @@ async def send_hook_message(member, hook_id, hook_token, text=None, image_url=No
|
||||||
# Use FormData because the API doesn't like JSON requests with file data
|
# Use FormData because the API doesn't like JSON requests with file data
|
||||||
fd = aiohttp.FormData()
|
fd = aiohttp.FormData()
|
||||||
fd.add_field("username", "{} {}".format(member["name"], member["tag"] or "").strip())
|
fd.add_field("username", "{} {}".format(member["name"], member["tag"] or "").strip())
|
||||||
|
if member["avatar_url"]:
|
||||||
fd.add_field("avatar_url", member["avatar_url"])
|
fd.add_field("avatar_url", member["avatar_url"])
|
||||||
|
|
||||||
if text:
|
if text:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue