alla cavallium enterprise gli standard non ci sono, bisogna mettere content-type in application/json
This commit is contained in:
parent
39e83a71b2
commit
a76a369d91
@ -93,8 +93,22 @@ class ChannelHistoryReadTask(AsyncTask):
|
||||
message = await MessagePyrogram._parse(self.client, message, users, chats)
|
||||
message = {"update_id": 1, "message": message}
|
||||
|
||||
data = json.dumps(message, default=JsonSerializer.default, ensure_ascii=True)
|
||||
result = await self.http.post(self.webhook, data=bytes(data, "utf8"))
|
||||
data = json.dumps(
|
||||
message,
|
||||
default=JsonSerializer.default,
|
||||
ensure_ascii=True,
|
||||
allow_nan=False,
|
||||
check_circular=True,
|
||||
sort_keys=False
|
||||
)
|
||||
|
||||
result = await self.http.post(
|
||||
self.webhook,
|
||||
data=data,
|
||||
headers=[
|
||||
("Content-Type", "application/json")
|
||||
]
|
||||
)
|
||||
|
||||
await result.read()
|
||||
result.close()
|
||||
|
Loading…
Reference in New Issue
Block a user