Skip to content

Commit 8a63ccf

Browse files
committed
fix: fail open on undetermined contacts auth
1 parent 3eb6f41 commit 8a63ccf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Sources/IMsgCore/ContactResolver.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ public final class ContactResolver: ContactResolving, @unchecked Sendable {
6767
case .authorized:
6868
return load(store: store, region: region)
6969
case .notDetermined:
70-
let granted = await requestAccess(store: store)
71-
return granted
72-
? load(store: store, region: region) : NoOpContactResolver(contactsUnavailable: true)
70+
// Do not block core CLI read paths on a permission request that may never
71+
// resolve promptly in headless or non-app contexts. Commands like
72+
// `imsg chats` and `imsg history` should still work without contact-name
73+
// enrichment.
74+
return NoOpContactResolver(contactsUnavailable: true)
7375
case .denied, .restricted:
7476
return NoOpContactResolver(contactsUnavailable: true)
7577
@unknown default:

0 commit comments

Comments
 (0)