Skip to content

Commit

Permalink
for channels you need the id silly
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Oct 27, 2023
1 parent 2c37e54 commit 9deba1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lib/mammoth/status_origin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def find(status_id, acct = nil)
Rails.logger.debug "PERSONAL KEY #{personal_list_key}"
results = redis.smembers(public_list_key).map { |o|
payload = Oj.load(o, symbol_keys: true)

originating_account = Account.find(payload[:originating_account_id])
# StatusOrigin Active Model for serialization
::StatusOrigin.new(source: payload[:source], channel_id: payload[:channel_id], title: payload[:title], originating_account:originating_account )
Expand All @@ -79,7 +80,7 @@ def key(id, subtype = nil)
end

def channel_reason(status, channel)
Oj.dump({source: "SmartList", channel_id: channel[:id], title: channel[:title], originating_account: status.account})
Oj.dump({source: "SmartList", channel_id: channel[:id], title: channel[:title], originating_account_id: status.account[:id]})
end

def mammoth_pick_reason(status)
Expand Down

0 comments on commit 9deba1f

Please sign in to comment.