mirror of https://gitlab.com/litecord/litecord.git
dms: represent dm response differently on api >v7
This commit is contained in:
parent
2eef16e28f
commit
dccd90890d
|
|
@ -47,6 +47,13 @@ async def get_dms():
|
|||
|
||||
async def jsonify_dm(dm_id: int, user_id: int):
|
||||
dm_chan = await app.storage.get_dm(dm_id, user_id)
|
||||
|
||||
if request.discord_api_version > 7:
|
||||
new_recipients = []
|
||||
for recipient_user in dm_chan["recipients"]:
|
||||
new_recipients.append(recipient_user["id"])
|
||||
dm_chan["recipients"] = new_recipients
|
||||
|
||||
return jsonify(dm_chan)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue