struct

UserFeed

Inherits Struct < Value < Object

UserFeed — per-user, per-feed state stored in the user_feeds table. (The Feed model owns feed-level data; user_feeds joins users ↔ feeds with per-relationship settings like episode_order, delivery_mode, last_viewed_at.)

Constants

VALID_DELIVERY_MODES = ["off", "notify", "mp3"] of ::String

Constructors

Class methods

delivery_subscribers_for(feed_id : Int64) : Array(Subscriber)

Returns every subscriber to feed_id whose delivery_mode is one of the active modes ('notify' or 'mp3'). Used by Delivery::Dispatch.fanout.

Source
get_delivery_mode(user_id : Int64, feed_id : Int64) : String
Source
last_viewed_at(user_id : Int64, feed_id : Int64) : Time | Nil
Source
set_delivery_mode(user_id : Int64, feed_id : Int64, mode : String) : Bool
Source
touch_viewed(user_id : Int64, feed_id : Int64) : Bool
Source

Instance methods

initialize
Source

Nested types