mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: make pin expiration mandatory
This commit is contained in:
@@ -43,6 +43,7 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
:pinned_globally,
|
||||
:pinned, # Is topic pinned and viewer hasn't cleared the pin?
|
||||
:pinned_at, # Ignores clear pin
|
||||
:pinned_until,
|
||||
:details,
|
||||
:highest_post_number,
|
||||
:last_read_post_number,
|
||||
@@ -177,6 +178,10 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
object.topic.pinned_at
|
||||
end
|
||||
|
||||
def pinned_until
|
||||
object.topic.pinned_until
|
||||
end
|
||||
|
||||
def actions_summary
|
||||
result = []
|
||||
return [] unless post = object.posts.try(:first)
|
||||
|
||||
Reference in New Issue
Block a user