b0deafc53e
* all the good changes * follows * dont send duplicates * remove follow_type for now * dont add all the extra stuff we're not implementing yet * refactor * lots of fixes * Delete activity.html.erb * Delete activity.text.erb * Update 20170209215819_create_follows.rb * Update schema.rb * Update mapping.rb * Update mailboxer.rb
17 lines
399 B
Ruby
17 lines
399 B
Ruby
# frozen_string_literal: true
|
|
module Events
|
|
class TopicUpdated < Event
|
|
#after_create :notify_users!
|
|
|
|
def self.publish!(topic, user, meta)
|
|
create!(kind: 'topic_updated',
|
|
eventable: topic,
|
|
user: user,
|
|
meta: meta)
|
|
end
|
|
|
|
def notify_users!
|
|
NotificationService.notify_followers(eventable, 'topic_updated', self)
|
|
end
|
|
end
|
|
end
|