Adding reblogs, favourites, improving atom generation
This commit is contained in:
parent
3b0bc18db9
commit
fa33750105
19 changed files with 251 additions and 79 deletions
|
@ -5,7 +5,7 @@ class StreamEntry < ActiveRecord::Base
|
|||
validates :account, :activity, presence: true
|
||||
|
||||
def object_type
|
||||
self.activity.object_type
|
||||
targeted? ? :activity : self.activity.object_type
|
||||
end
|
||||
|
||||
def verb
|
||||
|
@ -13,7 +13,7 @@ class StreamEntry < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def targeted?
|
||||
[:follow].include? self.verb
|
||||
[:follow, :share, :favorite].include? verb
|
||||
end
|
||||
|
||||
def target
|
||||
|
@ -27,4 +27,16 @@ class StreamEntry < ActiveRecord::Base
|
|||
def content
|
||||
self.activity.content
|
||||
end
|
||||
|
||||
def threaded?
|
||||
[:favorite, :comment].include? verb
|
||||
end
|
||||
|
||||
def thread
|
||||
self.activity.thread
|
||||
end
|
||||
|
||||
def mentions
|
||||
self.activity.mentions
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue