mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 01:25:21 +00:00
Add 'Send private message' action to chat user sheet (#649)
* Add 'Send private message' action to chat user sheet * Change 'Send private message' action color to purple * Fix: Resolve short ID against all participants, not just cached nicknames * Fix: Correctly open private chat sheet for mesh peers --------- Co-authored-by: a1denvalu3 <>
This commit is contained in:
co-authored by
a1denvalu3 <>
parent
dac81b2c3b
commit
96b35e957c
@@ -282,6 +282,25 @@ class GeohashViewModel(
|
||||
Log.d(TAG, "🗨️ Started geohash DM with ${pubkeyHex} -> ${convKey} (geohash=${gh})")
|
||||
}
|
||||
|
||||
fun startGeohashDMByNickname(nickname: String, onStartPrivateChat: (String) -> Unit) {
|
||||
val pubkey = repo.findPubkeyByNickname(nickname)
|
||||
if (pubkey != null) {
|
||||
startGeohashDM(pubkey, onStartPrivateChat)
|
||||
} else {
|
||||
Log.w(TAG, "Cannot start geohash DM: nickname '$nickname' not found in repo")
|
||||
// Optionally notify user
|
||||
}
|
||||
}
|
||||
|
||||
fun startGeohashDMByShortId(shortId: String, onStartPrivateChat: (String) -> Unit) {
|
||||
val pubkey = repo.findPubkeyByShortId(shortId)
|
||||
if (pubkey != null) {
|
||||
startGeohashDM(pubkey, onStartPrivateChat)
|
||||
} else {
|
||||
Log.w(TAG, "Cannot start geohash DM: shortId '$shortId' not found in repo")
|
||||
}
|
||||
}
|
||||
|
||||
fun getNostrKeyMapping(): Map<String, String> = repo.getNostrKeyMapping()
|
||||
|
||||
fun blockUserInGeohash(targetNickname: String) {
|
||||
|
||||
Reference in New Issue
Block a user