mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 01:45:22 +00:00
Fix: do not reject empty packets that arent message type (#510)
* do not reject empty packets that arent message type * leave message with empty byte array * clean up comments
This commit is contained in:
@@ -949,12 +949,11 @@ class BluetoothMeshService(private val context: Context) {
|
||||
* Send leave announcement
|
||||
*/
|
||||
private fun sendLeaveAnnouncement() {
|
||||
val nickname = delegate?.getNickname() ?: myPeerID
|
||||
val packet = BitchatPacket(
|
||||
type = MessageType.LEAVE.value,
|
||||
ttl = MAX_TTL,
|
||||
senderID = myPeerID,
|
||||
payload = nickname.toByteArray()
|
||||
payload = byteArrayOf()
|
||||
)
|
||||
|
||||
// Sign the packet before broadcasting
|
||||
|
||||
Reference in New Issue
Block a user