mirror of
https://github.com/we-promise/sure.git
synced 2026-06-05 02:39:04 +00:00
* First pass of Akahu * fix up sync all * conflicts * fix db migration issue? - fix auto selection of akahu account type * Address Akahu PR feedback * Complete provider metadata * Fix PR 1921 CI tests * PR feedback * PR feedback * post merge --------- Co-authored-by: failing <failing@users.noreply.github.com> Co-authored-by: Juan José Mata <jjmata@jjmata.com> Co-authored-by: sure-admin <sure-admin@splashblot.com>
21 lines
452 B
Ruby
21 lines
452 B
Ruby
class AkahuItem::SyncCompleteEvent
|
|
attr_reader :akahu_item
|
|
|
|
def initialize(akahu_item)
|
|
@akahu_item = akahu_item
|
|
end
|
|
|
|
def broadcast
|
|
akahu_item.accounts.each(&:broadcast_sync_complete)
|
|
|
|
akahu_item.broadcast_replace_to(
|
|
akahu_item.family,
|
|
target: "akahu_item_#{akahu_item.id}",
|
|
partial: "akahu_items/akahu_item",
|
|
locals: { akahu_item: akahu_item }
|
|
)
|
|
|
|
akahu_item.family.broadcast_sync_complete
|
|
end
|
|
end
|