mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-07 23:06:42 +01:00
13 lines
299 B
Elixir
13 lines
299 B
Elixir
defimpl Philomena.Attribution, for: Philomena.Posts.Post do
|
|
def object_identifier(post) do
|
|
to_string(post.topic_id || post.id)
|
|
end
|
|
|
|
def best_user_identifier(post) do
|
|
to_string(post.user_id || post.fingerprint || post.ip)
|
|
end
|
|
|
|
def anonymous?(post) do
|
|
!!post.anonymous
|
|
end
|
|
end
|