mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 20:45:19 +00:00
Add block/unblock user commands
Implemented user blocking functionality: - /block <nickname> - blocks a user from private messaging and ignores their messages in channels - /block - lists all blocked users - /unblock <nickname> - unblocks a user Implementation details: - Blocks are stored by public key fingerprint for persistence across sessions - Blocked users cannot send private messages or have their public messages displayed - Blocked users are silently ignored (they don't know they're blocked) - Blocking a user automatically removes them from favorites - Added getPeerPublicKey() method to BluetoothMeshService for accessing peer identity keys
This commit is contained in:
@@ -249,6 +249,11 @@ class BluetoothMeshService: NSObject {
|
||||
return String(fingerprint)
|
||||
}
|
||||
|
||||
// Public method to get peer's public key data
|
||||
func getPeerPublicKey(_ peerID: String) -> Data? {
|
||||
return encryptionService.getPeerIdentityKey(peerID)
|
||||
}
|
||||
|
||||
override init() {
|
||||
// Generate ephemeral peer ID for each session to prevent tracking
|
||||
// Use random bytes instead of UUID for better anonymity
|
||||
|
||||
Reference in New Issue
Block a user