Updates
This commit is contained in:
14
plugin.rb
14
plugin.rb
@@ -5,9 +5,12 @@
|
||||
# url: https://git.stonecarterstudios.com/StoneCarterStudios/custom-digest-posts
|
||||
|
||||
after_initialize do
|
||||
module CustomUserNotifications
|
||||
require_dependency 'user_notifications'
|
||||
|
||||
UserNotifications.class_eval do
|
||||
def digest(user, opts = {})
|
||||
super(user, opts).tap do
|
||||
super(user, opts)
|
||||
|
||||
@popular_posts =
|
||||
if SiteSetting.digest_posts > 0
|
||||
Post
|
||||
@@ -21,11 +24,8 @@ after_initialize do
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class ::UserNotifications
|
||||
prepend CustomUserNotifications
|
||||
self
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user