Fix client crash due to sending invalid chat messagesSigned-off-by: Ross Allan <[email protected]> (commit: 2eac230)