@byscott-io/where-is-waldo 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -290,6 +290,32 @@ their live sessions (multiple browser tabs, mobile, etc.):
|
|
|
290
290
|
WhereIsWaldo.configure do |config|
|
|
291
291
|
# The org/account a subject belongs to. Required to enable the roster.
|
|
292
292
|
config.roster_org = ->(subject) { subject.account }
|
|
293
|
+
#
|
|
294
|
+
# MULTI-ORG SUBJECTS: roster_org is handed only the subject, so it has to
|
|
295
|
+
# guess which org the person is in right now -- and `accounts.first` guesses
|
|
296
|
+
# by association order. Someone who has switched is then put on the wrong
|
|
297
|
+
# roster: invisible to the teammates they are with, shown to an org they are
|
|
298
|
+
# not in. Use roster_org_for instead, which also receives the container the
|
|
299
|
+
# CONNECTION is scoped to:
|
|
300
|
+
#
|
|
301
|
+
# config.roster_org_for = ->(user, container) { container || user.accounts.first }
|
|
302
|
+
#
|
|
303
|
+
# `container` is read from your own ActionCable connection, so it is only
|
|
304
|
+
# ever non-nil if that connection identifies one:
|
|
305
|
+
#
|
|
306
|
+
# module ApplicationCable
|
|
307
|
+
# class Connection < ActionCable::Connection::Base
|
|
308
|
+
# identified_by :current_user, :current_container, :session_id
|
|
309
|
+
# end
|
|
310
|
+
# end
|
|
311
|
+
#
|
|
312
|
+
# WhereIsWaldo::JwtConnection already does this. Without it `container` is
|
|
313
|
+
# always nil and the fallback above behaves exactly like plain roster_org --
|
|
314
|
+
# which is to say, like the bug.
|
|
315
|
+
#
|
|
316
|
+
# The resolved org is stored on the presence row at connect and read back by
|
|
317
|
+
# later broadcasts, so the subscriber and the broadcaster always agree on the
|
|
318
|
+
# stream. roster_org keeps working unchanged for single-org apps.
|
|
293
319
|
|
|
294
320
|
# What a VIEWER may see (:poll/:nudge/:fanout). Any visibility rule,
|
|
295
321
|
# server-enforced. Defaults to the viewer's whole org when unset.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byscott-io/where-is-waldo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Real-time presence tracking for ActionCable with React hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
72
|
"resolutions": {
|
|
73
|
-
"axios": "^1.
|
|
74
|
-
"follow-redirects": "^1.16.
|
|
75
|
-
"joi": "^18.
|
|
73
|
+
"axios": "^1.21.0",
|
|
74
|
+
"follow-redirects": "^1.16.2",
|
|
75
|
+
"joi": "^18.3.0",
|
|
76
76
|
"js-yaml": "^4.3.2",
|
|
77
|
-
"postcss": "^8.5.
|
|
78
|
-
"qs": "^6.
|
|
79
|
-
"undici": "^7.
|
|
80
|
-
"systeminformation": "^5.
|
|
81
|
-
"browserslist": "^4.
|
|
77
|
+
"postcss": "^8.5.32",
|
|
78
|
+
"qs": "^6.17.0",
|
|
79
|
+
"undici": "^7.30.1",
|
|
80
|
+
"systeminformation": "^5.33.16",
|
|
81
|
+
"browserslist": "^4.29.5",
|
|
82
82
|
"source-map-js": "^1.2.2"
|
|
83
83
|
}
|
|
84
84
|
}
|