Add threadID and boardID to regular post object to make it more compatible with Build.parseJSON output.
This commit is contained in:
parent
34534985e3
commit
8c6424f512
@ -109,10 +109,9 @@ Filter =
|
||||
test: (post, hideable=true) ->
|
||||
hl = undefined
|
||||
top = false
|
||||
boardID = if post.board then post.board.ID else post.boardID
|
||||
for key of Filter.filters when ((value = Filter[key] post)?)
|
||||
# Continue if there's nothing to filter (no tripcode for example).
|
||||
for filter in Filter.filters[key] when (result = filter value, boardID, post.isReply)
|
||||
for filter in Filter.filters[key] when (result = filter value, post.boardID, post.isReply)
|
||||
{hide, stub} = result
|
||||
if hide
|
||||
return {hide, stub} if hideable
|
||||
|
||||
@ -6,9 +6,11 @@ class Post
|
||||
@normalizedOriginal = Build.Test.normalize root
|
||||
<% } %>
|
||||
|
||||
@ID = +root.id[2..]
|
||||
@fullID = "#{@board}.#{@ID}"
|
||||
@context = @
|
||||
@ID = +root.id[2..]
|
||||
@threadID = @thread.ID
|
||||
@boardID = @board.ID
|
||||
@fullID = "#{@board}.#{@ID}"
|
||||
@context = @
|
||||
|
||||
root.dataset.fullID = @fullID
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user