Skip to content

Presence Library#90

Open
katfang wants to merge 10 commits into
mainfrom
katfang.presence-library
Open

Presence Library#90
katfang wants to merge 10 commits into
mainfrom
katfang.presence-library

Conversation

@katfang

@katfang katfang commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Third time's the charm?

Changes in this PR

  1. Turn presence into a library (can pass presence_library() to libraries on creating an Application)
  2. Make presence's default authorization allow_if(any=[is_app_internal, has_verified_token])
    • This means you gotta have a TokenVerifier or override Presence's auth (to allow for anonymous presence).
  3. Changed TS -> Python passing of Authorizer to allow multiple authorizers instead of just one.
    • This is the 4th commit. It does make it more verbose for the common case (1 authorizer), but it collapses it down to one code path ... Open to backing this out.
  4. Allow passing an AuthorizerRule instead of an Authorizer into the libraries
    • Python directly allows this
    • Typescript converts it to an Authorizer in the TS->Python library conversion code
  5. Allow passing an AuthorizerRule to set the authorization for all of presence_library's servicers instead of having to specify them individually.

Docs going in a different PR because honestly, this is probably big enough.

katfang added 10 commits July 14, 2026 14:19
* Only allows passing Presence.Authorizer instead of setting all 3 authorizers.
* Test updates to use library format
* Update Presence Library (Python) to take 3 authorizers
* Discussion for singleton authorizer vs subclassing: https://github.com/reboot-dev/mono/pull/5140 (comments)
…pp_internal, has_verified_token])

* Update tests to respect new default authorizer for presence
…orizers for all 3 servicers

* Add tests
    * methods fail without TokenVerifier
    * can override auth with an AuthorizerRule for all 3 servicers
    * assert raises if trying to specify specific Authorizers and general AuthorizerRule.
@aviator-app

aviator-app Bot commented Jul 14, 2026

Copy link
Copy Markdown

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue-ready label.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@katfang katfang requested a review from benh July 14, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant