mirror of https://github.com/Syncplay/syncplay
Fixed trailing newlines breaking messages (#300)
This commit is contained in:
parent
5f552ce0df
commit
2143b7dcf1
|
@ -830,6 +830,10 @@ class SyncplayClient(object):
|
|||
@requireServerFeature("chat")
|
||||
def sendChat(self, message):
|
||||
if self._protocol and self._protocol.logged:
|
||||
try:
|
||||
message = message.replace("\n", "").replace("\r", "")
|
||||
except:
|
||||
pass
|
||||
message = utils.truncateText(message, constants.MAX_CHAT_MESSAGE_LENGTH)
|
||||
self._protocol.sendChatMessage(message)
|
||||
|
||||
|
|
Loading…
Reference in New Issue