Skip to content

Commit

Permalink
Send dummy client version when uploading files
Browse files Browse the repository at this point in the history
Fixes #82.
  • Loading branch information
Terrance committed Apr 11, 2018
1 parent 178b3ea commit d203529
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion skpy/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit d203529

Please sign in to comment.