mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
implement attribution for topic
This commit is contained in:
parent
4827115b90
commit
14d693e2c1
1 changed files with 9 additions and 0 deletions
9
lib/philomena/topics/attribution.ex
Normal file
9
lib/philomena/topics/attribution.ex
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
defimpl Philomena.Attribution, for: Philomena.Topics.Topic do
|
||||||
|
def object_identifier(topic) do
|
||||||
|
to_string(topic.id)
|
||||||
|
end
|
||||||
|
|
||||||
|
def best_user_identifier(topic) do
|
||||||
|
to_string(topic.user_id)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue