mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-19 07:27:59 +01:00
13 lines
332 B
Elixir
13 lines
332 B
Elixir
defimpl Philomena.Attribution, for: Philomena.Comments.Comment do
|
|
def object_identifier(comment) do
|
|
to_string(comment.image_id || comment.id)
|
|
end
|
|
|
|
def best_user_identifier(comment) do
|
|
to_string(comment.user_id || comment.fingerprint || comment.ip)
|
|
end
|
|
|
|
def anonymous?(comment) do
|
|
!!comment.anonymous
|
|
end
|
|
end
|