From d203529c4aeba13f6898a855bd48a6a081bfd761 Mon Sep 17 00:00:00 2001 From: Ollie Terrance Date: Wed, 11 Apr 2018 18:29:54 +0100 Subject: [PATCH] Send dummy client version when uploading files Fixes #82. --- skpy/chat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skpy/chat.py b/skpy/chat.py index bc3ad45..1e71bbb 100644 --- a/skpy/chat.py +++ b/skpy/chat.py @@ -160,7 +160,9 @@ def sendFile(self, content, name, image=False): if not image: meta["filename"] = name objId = self.skype.conn("POST", "https://api.asm.skype.com/v1/objects", - auth=SkypeConnection.Auth.Authorize, json=meta).json()["id"] + auth=SkypeConnection.Auth.Authorize, + headers={"X-Client-Version": "0/0.0.0.0"}, + json=meta).json()["id"] objType = "imgpsh" if image else "original" urlFull = "https://api.asm.skype.com/v1/objects/{0}".format(objId) self.skype.conn("PUT", "{0}/content/{1}".format(urlFull, objType),