mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-09-19 04:59:59 +00:00
Tolerate a null mesh myPeerID when building mention candidates
CommandProcessorTest mocks MeshService without stubbing myPeerID. Pass orEmpty() so the helper does not NPE on that path.
This commit is contained in:
parent
67dd9dcafc
commit
77646fbae9
@ -564,7 +564,7 @@ class CommandProcessor(
|
||||
null -> {
|
||||
meshMentionCandidates(
|
||||
peerNicknames = meshService.getPeerNicknames(),
|
||||
myPeerID = meshService.myPeerID,
|
||||
myPeerID = meshService.myPeerID.orEmpty(),
|
||||
isPeerBlocked = privateChatManager::isPeerBlocked
|
||||
)
|
||||
}
|
||||
@ -601,7 +601,7 @@ class CommandProcessor(
|
||||
} else {
|
||||
meshMentionCandidates(
|
||||
peerNicknames = meshService.getPeerNicknames(),
|
||||
myPeerID = meshService.myPeerID,
|
||||
myPeerID = meshService.myPeerID.orEmpty(),
|
||||
isPeerBlocked = privateChatManager::isPeerBlocked
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user