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
|
# url: https://git.stonecarterstudios.com/StoneCarterStudios/custom-digest-posts
|
||||||
|
|
||||||
after_initialize do
|
after_initialize do
|
||||||
module CustomUserNotifications
|
require_dependency 'user_notifications'
|
||||||
|
|
||||||
|
UserNotifications.class_eval do
|
||||||
def digest(user, opts = {})
|
def digest(user, opts = {})
|
||||||
super(user, opts).tap do
|
super(user, opts)
|
||||||
|
|
||||||
@popular_posts =
|
@popular_posts =
|
||||||
if SiteSetting.digest_posts > 0
|
if SiteSetting.digest_posts > 0
|
||||||
Post
|
Post
|
||||||
@@ -21,11 +24,8 @@ after_initialize do
|
|||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class ::UserNotifications
|
self
|
||||||
prepend CustomUserNotifications
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user