dawarich/app/channels/family_locations_channel.rb

15 lines
346 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class FamilyLocationsChannel < ApplicationCable::Channel
def subscribed
2025-10-22 14:39:02 -04:00
return reject unless DawarichSettings.family_feature_enabled?
return reject unless current_user.in_family?
stream_for current_user.family
end
def unsubscribed
# Any cleanup needed when channel is unsubscribed
end
end