mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FEATURE: per-topic unsubscribe option in emails
This commit is contained in:
parent
56abd247e1
commit
6669a2d94d
18 changed files with 156 additions and 69 deletions
|
@ -716,6 +716,10 @@ class Topic < ActiveRecord::Base
|
|||
url
|
||||
end
|
||||
|
||||
def unsubscribe_url
|
||||
"#{url}/unsubscribe"
|
||||
end
|
||||
|
||||
def clear_pin_for(user)
|
||||
return unless user.present?
|
||||
TopicUser.change(user.id, id, cleared_pinned_at: Time.now)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue