MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / canReceiveNotification

Method canReceiveNotification

projects/runtime/src/server.ts:395–398  ·  view source on GitHub ↗
(method: string, connection: RuntimeConnection)

Source from the content-addressed store, hash-verified

393 }
394
395 private canReceiveNotification(method: string, connection: RuntimeConnection): boolean {
396 if (!connection.notificationPermissions || connection.notificationPermissions.length === 0) return true
397 return connection.notificationPermissions.some((permission) => this.matchesPattern(method, permission))
398 }
399
400 private matchesSubscription(notification: RuntimeNotification, entry: ConnectedRuntimeConnection): boolean {
401 return this.canReceiveNotification(notification.method, entry.connection) && (entry.subscriptions.has("*") || entry.subscriptions.has(notification.method))

Callers 3

matchesSubscriptionMethod · 0.95
replayNotificationsMethod · 0.95
capabilitiesForMethod · 0.95

Calls 1

matchesPatternMethod · 0.95

Tested by

no test coverage detected