This introduces a basic implementation to not display the content of
messages. It still shows that a message exists but shows localized
copy indicating why the content was hidden.
We should consider additional filters or queries in different views to actually
remove these posts but I'll leave that as up for discussion since I can see
value in showing that a blocked comment exists in a conversation.
Problem: The latest release seems to have some index problems, which is
frustrating, but might be able to be circumvented with a database
rebuild. The rebuild was something that Ahau funded and I'm excited to
be able to finally expose this to users without asking them to `rm -rf`
random files in their `~/.ssb` directory.
Solution: Replaced unused 'progress' bars (always at 100%) with rebuild
button.
Problem: Our tests seem to have been disabled in various places, which
means that type errors, typos, and other small problems were introduced.
Solution: Remove the comments and fix the underlying problems without
disabling the linters.
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.
Problem: The words "comment" and "reply" are super ambiguous, but
renaming them is hard.
Solution: I think "subtopic" captures the sentiment well, and makes it
clear that you're leaving the current topic to start a new topic (rather
than just replying to an individual message).
Problem: The sync goes forever, which isn't good if we're in an edge
case (like having peers who are offline with us).
Solution: Add a 5-minute timeout and refactor to use a design that's
maybe simpler? This is just my stab at the previous behavior, but there
are definitely improvements that could be made!
Rework how I'm doing progress checking and be very verbose about it
until I understand how this all works. Also refactors connected peer
function into shared model for use on settings page.
Problem: When replying to a private thread you only see the root post
because it's hiding all private comments. Instead, it should be hiding
all *encrypted* comments that we can't decrypt.
Solution: Use `isNotEncrypted()` instead of `isNotPrivate()`.
Problem: The Threads view advertises that it only shows public posts,
but is showing some private posts as well. This is not a security
concern, it's just a UI inconsistency.
Solution: Ensure that private posts are filtered from the view before
rendering. This also integrates a refactor that uses functions to check
for basic info like whether a message is a post, whether it's
encrypted/decrypted, whether it has a root, whether it has a fork, etc.
Previous query incorrectly pulled and sorted posts, often showing years
old posts from newly followed people. This now behaves more consistently
as "recent threads from people in your extended network".
- Adds a hover popup that shows the names of everyone who liked a post
when hovering of the heart.
- Add new call to post.get that retrieves the names of all voters and
returns them instead of their ID's.
Problem: A `null` relationship represents when it's your profile, which
isn't very intuitive. It causes an error when we try to check for the
`blocking` and `following` properties, which don't exist on `null`.
Solution: Instead of `null`, set a `me` property to tell whether this
relationship is our own profile.
Problem: We have a way to follow and unfollow, but there's no way to
block or unblock. Also if you go to the profile of a blocked peer, their
posts still show up.
Solution: Add block and unblock and hide messages from blocked peers on
their profile page.
Fixes: https://github.com/fraction/oasis/issues/370
Problem: Messages are being fetched with `post.get()`, which runs the
`transform()` function to decorate them with Markdown/etc, but then
they're being passed through `transform()` a second time at the end of
the function. This is inefficient and applies side-effects (like adding
channels to the post) twice.
Solution: Remove the final `transform()` so that these posts are only
decorated once.
Fixes: https://github.com/fraction/oasis/issues/358