openvibers/openvibe.network Commits

Chat may push notifications (support inboxes tell their people when a visitor asks for a person) (#320)

OP OpenVibers committed 20 days ago · bad2526717 · 1 file, +4 −0

* Chat may push notifications as service chat: support inboxes tell their people when a visitor asks for a person

* Chat's push grant needs no namespace: the push route checks the service by the token's name, and Chat's module namespaces stay chat.*

Changes

ddiff --git a/server/identity/principals.js b/server/identity/principals.js
iindex a5e5c82f..46965c78 100644
---- a/server/identity/principals.js
++++ b/server/identity/principals.js
@@@ -412,6 +412,10 @@ const DEFAULT_GRANTS = [
// first, then pushes as app 'search'.
['search', 'identity.subject.resolve', SELF_AUDIENCE, []],
['search', 'network.notifications.push', SELF_AUDIENCE, ['search']],
++ // Support inboxes (Chat's server/inbox/, 2026-10-24): a visitor who asks for a person, or writes while waiting,
++ // notifies the inbox's people through Network as service 'chat' (the push route checks that by the token's own
++ // name; no namespace, so Chat's module namespaces stay the chat.* ones). Chat already resolves subjects.
++ ['chat', 'network.notifications.push', SELF_AUDIENCE, []],
['live', 'events.subscription.manage', 'openvibe.events', []],
['live', 'events.event.read', 'openvibe.events', []],
// VIP gates in products: Chat's subscriber badge, Community's and Blog's members-only content, Live's own checks.