Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit a24999d

Browse files
committed
Add ClientInfo header on message creation
1 parent f09e922 commit a24999d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

skpy/chat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ def getMsgs(self):
7272
return [SkypeMsg.fromRaw(self.skype, json) for json in resp.get("messages", [])]
7373

7474
def createRaw(self, msg):
75+
# All fields except timezone are required; 1418 = desktop client.
76+
client = ("os=Windows; osVer=10; proc=x86; lcid=en-US; deviceType=1; country=US; "
77+
"clientName=skype4life; clientVer=1418/9.99.0.999//skype4life")
7578
resp = self.skype.conn("POST", "{0}/users/ME/conversations/{1}/messages"
7679
.format(self.skype.conn.msgsHost, self.id),
77-
auth=SkypeConnection.Auth.RegToken, json=msg)
80+
auth=SkypeConnection.Auth.RegToken, headers={"ClientInfo": client}, json=msg)
7881
url = resp.headers.get("Location")
7982
msgId = url.rsplit("/", 1)[-1] if url else None
8083
arriveTime = resp.json().get("OriginalArrivalTime")

0 commit comments

Comments
 (0)