NodeBB 4.1.0

submitted by edited

We just released version 4.1.0 of NodeBB. Here are the latest features you can now take advantage of!

As an aside, for the first time in a long while, both @baris and I are working on the same codebase again. Up until version 4 was released, I'd been working on the activitypub branch and periodically merging in the latest changes from develop. It's nice to be home! :house_with_garden:


Improved federation of Group actors :left_speech_bubble:

We've improved the activity synchronization for followed group actors. Local updates/likes/etc. are now federated outward by the category in addition to those from remote users. Thanks to @rimu@piefed.social and @freamon who worked with me on debugging this one.

Mentions and Emoji now federating out in source.content :wave:

Emoji and mentions have been sent out to followers since v4, but that wasn't reflected in the raw markdown content that we also send along. That has been remediated now, and this change improves nodebb-to-nodebb federation.

Video object type now parseable :tv:

NodeBB is now able to ingest Peertube Video objects, and render then in a topic just like other pieces of content. Thanks @deadsuperhero@forum.wedistribute.org for prodding me to get this sorted out!

25

Log in to comment

48 Comments

@julian@community.nodebb.org for some reason in Lemmy this post is stuck at the top of the "New" sort, even though it's already 2 days old.

Yeah, not an ideal experience. I guess a placeholder as suggested above would be a better experience, especially for users not familiar with concept of fediverse.

@bh4-tech @Kichae what you're seeing is a link rendered by the link-preview plugin because the image hasn't been loaded yet.

What's supposed to happen is the link gets replaced in real time with the image or box, but sometimes the timing is off and the loaded post doesn't load in time to catch the response.

Blah de blah technical stuff. It can be fixed I think...

@julian My nodebb instance is able to federate with threads and so I get posts from there also. Media from threads come in extra long url, with a very long hash(I guess) after the actual resource, so this problem gets even more prominent there. Would be nice if this is solved soon.threads.jpg
Here, you can see the video url after the text of the post.

@bh4-tech does the video or whatever load properly after you refresh?

For mastodon based servers, media loads properly after refresh. For threads, my nodebb instance dosen't respond(Bad gateway cloudflare 502 cloudflare error) after refresh, so the only way I can access the media is clicking on the long link.
Both are non user-friendly UX, specially for those who are not accustomed to activitypubcf.jpg

I tried running with ./nodebb dev and although no response was received from site (pic above) no error message was also logged in console

@bh4-tech NodeBB crashes when you navigate to a post from Threads containing a link?

Can you share the link here? Will it crash? Let's see 😐

Here is the link
https://ekk.app/topic/e670e98f-c13f-4ab5-b174-96974ebca495/jay_shah_%E0%A4%95%E0%A4%95_%E0%A4%B0%E0%A4%A8_%E0%A4%AE

and here is the original post link
https://www.threads.net/@dhananjay.naidu02/post/DHAlBHgzryu

@bh4-tech Now threads seems to have reduced the time for URL signature expiry and media files expire by 24 hrs @julian For this, the only workaround I think is that my nodebb instance will need to save(cache) the remote media as soon as it is received
Posting the link of a recent post below whose media has around 10 hrs more before it expires
https://ekk.app/topic/40fda023-3d00-42e1-ad8c-ca3973760012/__

@bh4-tech I realised that a part of the issue was due to the fact that I was using cloudflare proxy. Disabling that improved the situation. Now, my instance does not crash on viewing threads media. Also, for every 3-4 media , 1 media file loads properly(link is not displayed, actual media is displayed). Maybe, admins should have the ability to set a custom timeout for the link preview plugin so that the success rate for viewing remote media becomes 100% as compared to current 25-33 %. @julian

@bh4-tech Also, noticed that in some cases image preview is displayed properly beside the topic headline, but in the actual topic, instead of the image we see the link.
imgprob.jpg

Edit: no problem with posted messages showing now

@eeeee if you wait, does it show up eventually?

@baris fixed a bug related to this as well, but this was before v4.1.0

It happened earlier today, but now its ok.
.. I will do some more testing to determine when its an issue

Edit: Seems to be working fine. Maybe I was in low signal area when it didnt earlier

this is stuck as the most recent post for me lol

@kspatlas@kbin.earth loving how this is messing with AP instances everywhere lol.

I updated the timestamp but it doesn't seem to have propagated over to your instance!

I noticed this last night. I think it's been going on for a couple days now. What gives?

The most recent post on the entire Lemmy.

Same thing, no video on restart.

@julian Consider adding .mention class to mentions in HTML content. Some clients transform such links into internal links.

@silverpill@mitra.social ironically we do add that class in NodeBB, but we explicitly strip out all custom class names because there's no guarantee that recipients would know how to handle it.

Since a .mention has no standardized meaning, I opted to remove it for federated content.

Also mentions can be detected in content as they're explicitly defined in the payload.

Well, depending on a class from a 3rd-party is not the best way to go about it. Anyway, the server should reconstruct the html and add the appropriate .mention class based on any existing Mention links from the ActivityPub object.

@julian Is Video support limited to just Peertube videos? Asking this because, a video post on threads renders properly on mastodon and kokonnect(misskey fork) but only the text is displayed and not the video on my nodeb instance running 4.1.0. The post is https://www.threads.net/@b4htech/post/DGmUEn7y76q?xmt=AQGz1bBLfaQf_DsxBxScCQa7LxwcwQD3CSh5bf7j8nU0fA

Below attached are the screenshots of the above post on-
1)mastodon.png mastodon

2)calckey.png kokonnect

3)mynodebb.png My nodebb instance https://ekk.app

@bh4-tech might be a caching issue. Any chance you can restart your NodeBB and see if the link shows up?

Right now the video player won't embed, but the minimum should be a link.

Restart from admin panel or stop and start from cmd on server?

@bh4-tech either

@julian Restarting also did not change anything.
Also, noticed that if a post on mastodon, lemmy or threads has an image, it is shown beside the topic headline as a thumbnail but is not rendered below the actual text as an image. I guess that once this problem is fixed, videos(or video links) will also get rendered. The same behavior is observed on both community.nodebb.org as well as my nodebb instance. Attaching screenshots of both-
1)community.nodebb.org with a lemmy post nimn.png

2)my nodebb instance with a mastodon postnime.png

@bh4-tech Update: I think that community.nodebb.org is now running with latest commits from the develop branch and so remote images and videos can be viewed once we click on the attachment link. But I think the UX can be somewhat improved.

Current experience- A remote post contains a media file. The file(image) is not displayed below the text and only its link is displayed. An unaware user might not notice that it's an image and not click on the link thinking it's an external link and, in that case, will only see the text and so the post will feel awkward to the user.(I know that once any one user clicks on a link, the media gets loaded inline automatically for all other users, but even that also seems a good amount of friction). Also, if the forum is installed as PWA, clicking the media link will open it in a custom tab.

Possible improvement- Instead of the link, show a simmerring image loading animation(the one we see on instagram or youtube when images/thumbnails are loading) with the text "Click to view" and upon clicking on the animation the media gets loaded.

@bh4-tech FWIW, refreshing the posts has worked to load media links in line for me. Still not an ideal experience, but better than having to click on the image links.

Does nodebb support following/joining federated communities? And does it support switching to a threaded view?

@onlinepersona@programming.dev Following groups on other sites works well. The current default theme doesn't do visual threading, but reply relationships are maintained and linked. QuickReply kind of quietly discourages direct replies to comments, though, so I imagine many users - especially those new to the bulletin board experience - may end up replying to OPs, especially without a threaded UI.

I'm sure there's nothing stopping someone from making a threaded theme, though.

@onlinepersona@programming.dev there is some active discussion around how to better represent federated communities. The current iteration of NodeBB will bring them in as regular user accounts that can be followed, and this is tested and working with Lemmy and PieFed, primarily.

@Kichae, two things:

  1. You're right, and I've brought that up internally. It's difficult to justify the change in UX, but there may be a way to support both UX flows with the addition of a checkbox that adjusts toPid/inReplyTo. The downside of that is the whole point of the quick-reply box is to *actively limit* the number of visible controls :smirk:

  2. A threaded view is difficult because it is not scalable, at least with the way our current backend is built out. We load topics page by page, which means every page is loading in O(x*n) time¹, where x is the number of posts. If we wanted to load a threaded view, we'd have to query every single post and build the threaded relationship on-the-fly, since we don't maintain that in the backend, and that's... O(a lot more)²

There is a way we can approximate the threaded UI, but @baris and I haven't played around with it for a couple years...


¹ I am not well-versed in computer science so I may be wildly wrong about this
² very scientific, yes.

@julian Personally, I find the reply list -- and especially the new auto-quote back-references -- a more than sufficient solution, but then I don't think threaded discussions are a value-add to the bulletin board experience.

It's just not part of the expected UX, and kind of *breaks* the BB UX, which has always been built on the expectation of reverse-chronological posting. Not that I don't understand the utility, or someone having the preference. Threading is now ubiquitous on other social modals. It's become part of the design language of Web 2.0.

Some platforms that use threading now only load the first couple of levels of replies. I wonder if that's something that's currently possible via theme work, or if a plugin would be required, or even if work on core would be necessary. Or if some sort of popup modal that loads threads might be viable? Solutions that wouldn't require the threads to be pre-loaded.

@Kichae the workaround that @baris and I played around with (very) briefly involved the "x replies" expando button.

I think there were some rather simple adjustments made to load only one level at a time, and that was essentially the "threaded" view.

I don't remember the details any more, perhaps he does.

Yeah there is a config property config.showNestedReplies https://github.com/NodeBB/NodeBB/blob/master/public/src/client/topic/replies.js#L40, it is not exposed anywhere but a plugin can set this to true in filter:config.get and that would cause more than one level of replies to show up. However the posts all show up at the top level in chronological order, since core adds everything at the top level(tid::posts) and then adds it topid::replies if it is a reply to a specific post.

@baris could we theoretically load only top-level replies by:

  • filtering tid::posts (expensive), or
  • maintaining a separate zset (lighter, but yet another zset to maintain)?

Filtering goes :snail: when you have a topic with 50k posts, and adding a new zset means adding 2 actually because there is sort by timestamp and sort by votes for topics.

I made a post about this, where I tried to post into a Lemmy community and it didn't arrive
https://github.com/NodeBB/NodeBB/issues/13218
The example is contained in this thread
https://community.nodebb.org/topic/18647/the-state-of-conversational-contexts-february-2025/24

@julian did you have a chance to look at this issue of not being able to post into lemmy community?
Aldo, posts from Lemmy mentioning my nodebb username arent coming through, but they do reach going the other direction
It doesnt work from Lemmy->Nodebb whether the poster is only followed, or even when the Lemmy poster directly mentions nodebb user!
This of course may be a Lemmy issue given that its working fine from Nodebb, and is fine with Mastodon

@eeeee If you mean 'post' in the sense that Lemmy means 'post' (i.e. something distinct from a comment), then Lemmy doesn't process User Mentions in those. In a comment, you can Mention your NodeBB user and Lemmy will send it to the relevant instance, but nothing will happen if you Mention your NodeBB user in a post.

@eeeee @freamon I wonder how Lemmy knows whether a root post is for a community of not.

If you mention the community then it's addressed, and that should be enough.

@freamon
Are you saying that Lemmy is different in that regard?
Example. Im logged into Lemmy and see an interesting post that a friend might be interested in.
I post as a reply
Hey @friend@nodebbinstace look at this

Then it wont notify? How am I supposed to include a friend in a thread?

@eeeee Your reply (what Lemmy would term a comment) would go out to friend@nodebbinstance but it would be up to nodebbinstance to resolve what post the comment was a reply to.

To illustrate what I mean about Lemmy and User Mentions in posts, see this post as an example. In the body of that post, the user Mentions 2 people - ada@lemmy.blahaj.zone anddb0@lemmy.dbzer0.com but neither of those people would have been notified of that post. You can see for yourself by looking at the activitypub representation of that post (by running curl --header 'accept: application/activity+json' --location https://lemmy.dbzer0.com/post/39126561 | jq .) and noting that there are no Mentions in the 'tag' section. By contrast, another user Mentions ada@lemmy.blahaj.zone in this comment, and she would have been notified of that (you can see that this time there is a Mention in activitypub representation of that coment).

@julian For the other direction - as you've found out, Lemmy will first look at 'audience' for a root post and try to resolve it and bail if that doesn't work. If there's no 'audience', it will look in 'cc' to try to find a community and stops when it finds one. It won't look further, so you can't post in more than one community at a time, and you can't use a root post to post in Lemmy community and also notify a Lemmy user of it. It distinguishes between root posts and other posts because the root post is a Note will 'null' for 'inReplyTo'.