copy text and fix notifications for DM

This commit is contained in:
callebtc
2025-07-13 23:42:58 +02:00
parent 2b63c7805e
commit 20cf8b59f8
3 changed files with 22 additions and 21 deletions
@@ -49,15 +49,13 @@ class MeshDelegateHandler(
// Show notification with enhanced information - now includes senderPeerID
message.senderPeerID?.let { senderPeerID ->
if (state.getSelectedPrivateChatPeerValue() != senderPeerID) {
// Use nickname if available, fall back to sender or senderPeerID
val senderNickname = message.sender.takeIf { it != senderPeerID } ?: senderPeerID
notificationManager.showPrivateMessageNotification(
senderPeerID = senderPeerID,
senderNickname = senderNickname,
messageContent = message.content
)
}
// Use nickname if available, fall back to sender or senderPeerID
val senderNickname = message.sender.takeIf { it != senderPeerID } ?: senderPeerID
notificationManager.showPrivateMessageNotification(
senderPeerID = senderPeerID,
senderNickname = senderNickname,
messageContent = message.content
)
}
} else if (message.channel != null) {
// Channel message