5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 19:16:23 +00:00

feat: announce y like

This commit is contained in:
f 2024-03-14 17:58:41 -03:00
parent 1e44fba4b3
commit f4379b45c2
No known key found for this signature in database
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# frozen_string_literal: true
class ActivityPub
class Activity
# Boost
class Announce < ActivityPub::Activity; end
end
end

View file

@ -0,0 +1,8 @@
# frozen_string_literal: true
class ActivityPub
class Activity
# Like
class Like < ActivityPub::Activity; end
end
end

View file

@ -0,0 +1,12 @@
# frozen_string_literal: true
# Soportar nuevos tipos
class FixActivityType < ActiveRecord::Migration[6.1]
def up
%w[Like Announce].each do |type|
ActivityPub::Activity.where(Arel.sql("content->>'type' = '#{type}'")).update_all(type: "ActivityPub::Activity::#{type}", updated_at: Time.now)
end
end
def down; end
end