@byscott-io/where-is-waldo 0.1.3 → 0.1.4
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 +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -120,6 +120,16 @@ WhereIsWaldo.configure do |config|
|
|
|
120
120
|
config.roster_org = ->(user) { user.account }
|
|
121
121
|
config.roster_members = ->(org) { org.users.active }
|
|
122
122
|
|
|
123
|
+
# Optional: skip presence registration for specific connections while
|
|
124
|
+
# keeping them subscribed for broadcasts. Return truthy to suppress. The
|
|
125
|
+
# subscriber still streams from where_is_waldo:subject:<id> and receives
|
|
126
|
+
# WhereIsWaldo.broadcast_to messages — they just don't count as present.
|
|
127
|
+
# Typical use: support-user impersonation tabs shouldn't light up as the
|
|
128
|
+
# impersonated user in teammates' rosters.
|
|
129
|
+
config.suppress_presence_proc = ->(connection) {
|
|
130
|
+
connection.request.session[:su_user].present?
|
|
131
|
+
}
|
|
132
|
+
|
|
123
133
|
# Redis adapter
|
|
124
134
|
# config.redis_client = Redis.new(url: ENV["REDIS_URL"])
|
|
125
135
|
end
|