I do not particularly _love_ this solution, but it is simple and effective I can't find another reliable way to determine if a link goes to a local note of the given id, apart from fetching the link
_RUFFLE_VERSION_