fix: document intentionally empty default no-op bodies

This commit is contained in:
davotoula
2026-07-11 11:12:20 +01:00
parent b64c378a9d
commit cf95b07855
2 changed files with 9 additions and 3 deletions
@@ -50,7 +50,9 @@ interface RelayAuthPermissionStore {
suspend fun recordUse(
relayUrl: String,
additions: Map<AuthPurposeKind, Set<String>>,
) {}
) {
// no-op by default: stores that don't track rationale ignore recorded uses.
}
/** The accumulated grant rationale for [relayUrl] (purpose → counterparty pubkeys). */
suspend fun loadRationale(relayUrl: String): Map<AuthPurposeKind, Set<String>> = emptyMap()
@@ -59,7 +61,9 @@ interface RelayAuthPermissionStore {
suspend fun allRationales(): Map<String, Map<AuthPurposeKind, Set<String>>> = emptyMap()
/** Forgets the accumulated grant rationale for [relayUrl] (does not touch the ALLOW/DENY override). */
suspend fun clearRationale(relayUrl: String) {}
suspend fun clearRationale(relayUrl: String) {
// no-op by default: stores that don't track rationale have nothing to clear.
}
/** Epoch-second timestamp of the last time each relay was authenticated with (for display). */
suspend fun allLastUsed(): Map<String, Long> = emptyMap()
@@ -80,7 +80,9 @@ interface RelayConnectionListener {
fun onEventGaveUp(
relay: IRelayClient,
event: Event,
) {}
) {
// no-op by default: listeners that don't surface delivery failures ignore it.
}
}
object EmptyConnectionListener : RelayConnectionListener