mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Server side code for Watching First Post Only
This commit is contained in:
parent
1eb64151f6
commit
2005565c9c
13 changed files with 112 additions and 39 deletions
|
@ -42,7 +42,8 @@ class Notification < ActiveRecord::Base
|
|||
invited_to_topic: 13,
|
||||
custom: 14,
|
||||
group_mentioned: 15,
|
||||
group_message_summary: 16
|
||||
group_message_summary: 16,
|
||||
watching_first_post: 17
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -107,11 +108,6 @@ class Notification < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def text_description
|
||||
link = block_given? ? yield : ""
|
||||
I18n.t("notification_types.#{Notification.types[notification_type]}", data_hash.merge(link: link))
|
||||
end
|
||||
|
||||
def url
|
||||
topic.relative_url(post_number) if topic.present?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue