mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Use compact encoding for json on websocket
Remove extra whitespace from json encoding used when sending messages on the websocket.
This commit is contained in:
parent
07adb330db
commit
023e0eb1d5
@ -70,7 +70,7 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
|
|
||||||
msg = 'Keeping websocket alive with timestamp {0}'
|
msg = 'Keeping websocket alive with timestamp {0}'
|
||||||
log.debug(msg.format(payload['d']))
|
log.debug(msg.format(payload['d']))
|
||||||
self.socket.send(json.dumps(payload))
|
self.socket.send(json.dumps(payload, separators=(',', ':')))
|
||||||
|
|
||||||
class WebSocket(WebSocketBaseClient):
|
class WebSocket(WebSocketBaseClient):
|
||||||
def __init__(self, dispatch, url):
|
def __init__(self, dispatch, url):
|
||||||
@ -436,7 +436,7 @@ class Client(object):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.ws.send(json.dumps(second_payload))
|
self.ws.send(json.dumps(second_payload, separators=(',', ':')))
|
||||||
|
|
||||||
def _resolve_mentions(self, content, mentions):
|
def _resolve_mentions(self, content, mentions):
|
||||||
if isinstance(mentions, list):
|
if isinstance(mentions, list):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user