This repository was archived by the owner on Mar 2, 2021. It is now read-only.

Description
Create a function that will listen to each changes at the API endpoint /tracks/$track.
-
check if this $track.yid exists at the new model trackUniques.[$track.yid]
-
if exists: create a new relation (question: reference the $track.id or $track.channel? — see note1)
-
if not: create the new trackUniques model and its first relation
-
play the role of a backend and parse the $track.body for each #hashtag, and save them in new relationship $track.tags: hasMany('tag') —> we'll then have to create the /tags API endpoint
-
could also check if there is a @mention (or +@mention that could mean "send this track to my friend") and if $track.channel is in @mention.favorites would add this info somewhere (to be determined and though uppon — let's please not spam)
Note1:
OR trackUniques.[$track.yid].channels.[$track.channel] = true
OR trackUniques.[$track.yid].trackOccurences.[$track.id] = true
OR both