Commit Graph

104 Commits

Author SHA1 Message Date
Nick Wynja 4e8f7426a4 Merge branch 'master' of https://github.com/fraction/oasis into subscribed-channels 2021-03-03 13:49:10 -05:00
Nick Wynja 398ebe9271 Adds subscribed channels to Topics
Any subscribed channels now appear at the top of Topics. This gives you
easy access to view subscribed channels using the existing hashtags
view.
2021-03-03 13:36:23 -05:00
Nick Wynja 31e5ae37d5 Hides content of messages from blocked people
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.
2021-03-02 17:47:28 -05:00
Soma 519d0e55f0 fix linting issues 2021-02-13 07:33:28 -08:00
Soma c05023e0dd updating code for likes page bug 2021-02-13 07:23:26 -08:00
Christian Bundy 3530560f25
Merge pull request #585 from lindskog/iss399
Add social filter to threads
2021-01-27 07:49:11 -08:00
Cecilia Lindskog bb5dfced9b Add social filter to threads 2021-01-27 12:12:40 +01:00
Cecilia Lindskog 29dcaad89c Fix issue with feedId 2021-01-27 10:57:04 +01:00
Cecilia Lindskog 3c771da8ff Issue 126: Show recipients of private messages 2021-01-26 10:33:29 +01:00
Christian Bundy a02744d0eb Add rebuild button to settings
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.
2020-11-29 10:55:00 -08:00
Christian Bundy 65b7df9ea9 Remove comments to disable linters
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.
2020-11-22 16:52:12 -08:00
Christian Bundy 0aacf3bbc3 Fix tests and remove workaround
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
2020-11-11 08:25:38 -08:00
Alexander Cobleigh 4d5c571df3 restore common-good check & fix its errors
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.
2020-10-21 15:33:01 +02:00
Henry e7dd215f4d fix common-good setup
somehow it's cli arguments changed
2020-10-19 10:06:34 +02:00
Henry 3bdca12a21 invalidate @mentions cache if the user follows someone 2020-10-19 10:06:07 +02:00
Henry c3acbc80d1 fix @mentions lookup table
with duplicates ignored switching back to a previous name doesn't work.
Imagine names [a,b,a], with duplicates ignored the query only returns [a,b].
2020-10-19 10:06:07 +02:00
Henry 8f9ef5e3c7 change name->feed lookup structure
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/
2020-10-19 10:06:07 +02:00
Henry d1e68e94a7 some prefix matching logic
lowercase the searches and see if they match the beginning of a name.
2020-10-19 10:06:06 +02:00
Henry 9004280d0b some @mentions in preview
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.
2020-10-19 10:06:06 +02:00
Henry be412793c2 whoops cleanup 2020-10-19 10:04:39 +02:00
Henry 423c0c11f4 begin working on preview with blobs 2020-10-19 10:04:39 +02:00
Daan Wynen 9519050eb2 Add rendering of blog messages.
Patchwork does that. So if we're aiming for feature parity...
Also, blogs are neat. :)
2020-05-25 03:46:29 +02:00
Daan Wynen a40b2eefc1 make the linters happy.
this time they had a *lot* of opinions. :P
2020-05-23 21:14:49 +02:00
Daan Wynen e8c8aa49a7 Add simple pagination to user feeds.
This is simply based on sequence numbers and the `gt`/`lt` arguments of
`createUserStream`.
2020-05-23 06:13:11 +02:00
Jacob Karlsson 3b753f16ac Apply style fixes 2020-05-03 23:14:19 +02:00
Jacob Karlsson e456c1d9c5 Add image search 2020-05-03 22:16:44 +02:00
Christian Bundy 8e2eb404e0 Rename "reply" to "subtopic"
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).
2020-04-16 08:31:35 -07:00
Christian Bundy ef53618543 Run linter
Problem: I always forget to run the linter. I should probably add this
as a personal git-hook.

Solution: `npm run fix`.
2020-04-14 11:36:25 -07:00
Christian Bundy ce8c15a6eb Add timeout to sync and refactor
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!
2020-04-14 11:32:58 -07:00
Nick Wynja d9423b17e4 Use target for progress checks 2020-04-14 12:55:29 -04:00
Nick Wynja 2ecfee4a24 Clean up 2020-04-14 08:08:10 -04:00
Nick Wynja eaf8a9d713 Lint fix 2020-04-14 08:03:27 -04:00
Nick Wynja ed12afbb91 Refactor peer checking
Split peers and peers connected and add function to disconnect
2020-04-14 07:57:31 -04:00
Nick Wynja f3eac9fff8 Lint fix 2020-04-13 17:35:42 -04:00
Nick Wynja a896f637e5 Progress checking and connected peers
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.
2020-04-13 17:27:03 -04:00
Nick Wynja fd1d63ffba Introduces sync endpoint
Starts, waits until connected to peers, waits for progress, disconnects
2020-04-13 11:28:36 -04:00
Christian Bundy ff77308033 Fix broken getMessages() logic
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()`.
2020-04-10 12:46:44 -07:00
Christian Bundy 5cd0432f2e Fix private posts rendered alongside public posts
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.
2020-04-09 08:16:43 -07:00
Christian Bundy ac6441d3e0
Merge pull request #377 from timjrobinson/add-liked-names
Show who liked content on hover
2020-03-31 10:13:55 -07:00
Nick Wynja 0e698df8f3 Updates query for threads
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".
2020-03-31 10:34:47 -04:00
Tim Robinson 4884a49dfb Pretty-ify code. Remove unnecessary comment 2020-03-31 00:19:58 -07:00
Tim Robinson 8cce580008 Show who liked content on hover
- 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.
2020-03-30 23:53:27 -07:00
Christian Bundy 7e22829578 Fix own profile error
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.
2020-03-28 13:32:02 -07:00
Christian Bundy e7bd3ed305 Add block and unblock to author 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
2020-03-28 10:03:31 -07:00
Sean Billig e96486b1d0
Merge pull request #366 from christianbundy/fix-double-channel
Avoid processing popular posts twice
2020-03-27 14:51:02 -07:00
Sean Billig 288d5f10fa
Merge pull request #341 from christianbundy/root-channel
Don't append channel to non-root posts
2020-03-27 10:46:07 -07:00
Christian Bundy 5b2ae2a219 Avoid processing popular posts twice
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
2020-03-27 09:43:57 -07:00
Nick Wynja 95e7a31dcd lint fix 2020-03-25 09:05:53 -04:00
Nick Wynja 48f8108340 Merge master 2020-03-24 21:00:38 -04:00
Christian Bundy 11c413d447 Merge branch 'master' of github.com:fraction/oasis into npm-update-march-23 2020-03-24 12:09:39 -07:00