fix: /w shows usernames now

This commit is contained in:
callebtc
2025-07-11 18:27:24 +02:00
parent c585b5c4ac
commit 75c4b758b6
@@ -37,7 +37,7 @@ class CommandProcessor(
when (cmd) { when (cmd) {
"/j", "/join" -> handleJoinCommand(parts, myPeerID) "/j", "/join" -> handleJoinCommand(parts, myPeerID)
"/m", "/msg" -> handleMessageCommand(parts, meshService) "/m", "/msg" -> handleMessageCommand(parts, meshService)
"/w" -> handleWhoCommand() "/w" -> handleWhoCommand(meshService)
"/clear" -> handleClearCommand() "/clear" -> handleClearCommand()
"/block" -> handleBlockCommand(parts, meshService) "/block" -> handleBlockCommand(parts, meshService)
"/unblock" -> handleUnblockCommand(parts, meshService) "/unblock" -> handleUnblockCommand(parts, meshService)
@@ -127,11 +127,11 @@ class CommandProcessor(
} }
} }
private fun handleWhoCommand() { private fun handleWhoCommand(meshService: Any) {
val connectedPeers = state.getConnectedPeersValue() val connectedPeers = state.getConnectedPeersValue()
val peerList = connectedPeers.joinToString(", ") { peerID -> val peerList = connectedPeers.joinToString(", ") { peerID ->
// This would need mesh service access for nicknames // Convert peerID to nickname using the mesh service
peerID // For now just use peer ID getPeerNickname(peerID, meshService)
} }
val systemMessage = BitchatMessage( val systemMessage = BitchatMessage(