Problem: You can't publish email addresses or user@host combos or
anything like that because the regex is super liberal in what it
matches.
Solution: Ensure that the first word in a message is a mention *or*
ensure that there's whitespace before a mention. This also adds a
regex101 link (in lieu of proper testing, for now) which makes this
easier to test and track over time.
See-also: https://github.com/fraction/oasis/issues/466
Problem: Recently there was a PR [0] merged with a quickfix to avoid
some test failures, which is something I've been trying to avoid. While
`process.exit()` works fine, I'm worried that it means we don't
understand what's happening under the hood, *plus* I have the [maybe
unjustified?] worry that it might kill the process during a database
write or something dangerous. It looks like this particular test hang
was caused by both a stream and some number of intervals that were left
open.
Solution: Provide a way to close the stream and intervals in `index.js`
and ensure that we do that before closing the server.
[0]: https://github.com/fraction/oasis/pull/462
after having restored the package-lock.json to that of the master branch, this
PR now uses common-good@2.0.3, which has common-good check as a command.
i ran it manually as $(npm bin)/common-good check, and fixed whatever
it complained about.
we had duplicates and _old_ names in the first attempt,
with this new strucutre only one name per feed is kept (the most recent)
also: tweak regexp some more
should not correctly match end of string and NOT match inside md link
https://regex101.com/r/Uu6iTj/3/
replaces immediatly if there is one match,
but just spews multiple ones.
* add silly in-memory about:name cache
rational is also commented the code. the tl:dr; is oasis already doesnt
use ssb-about or other indexing plugins.
butt for @mentions we need a quick way to lookup names to feeds,
otherwise we block the preview flow with long query times.