We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49ae5c4 commit b530855Copy full SHA for b530855
src/screens/chat/packetHandler.ts
@@ -92,12 +92,10 @@ export const packetHandler =
92
if (statusRef.current === 'CONNECTING' && connection.loggedIn) {
93
setLoading('')
94
statusRef.current = 'CONNECTED'
95
- if (sendJoinMessage) {
+ const joinMessageToSend = joinMessage.substring(0, charLimit).trim()
96
+ if (sendJoinMessage && joinMessageToSend) {
97
connection
- .writePacket(
98
- 0x03,
99
- concatPacketData([joinMessage.substring(0, charLimit)])
100
- )
+ .writePacket(0x03, concatPacketData([joinMessageToSend]))
101
.catch(handleError(addMessage, sendMessageError))
102
}
103
if (sendSpawnCommand) {
0 commit comments