-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Older newsreaders see new posts in GROUP, but can't actually list any #3
Comments
Thanks for testing! I think adding XOVER support is no problem, I'll work on that. Listing newsgroups is a problem because there's no API to do that. I could pre-seed it with the top 500 subreddits, so at least you would see something in those clients. I can't imagine what the problem is with the GROUP command, maybe it's because the name doesn't match. The server is supposed to send:
I'm sending back |
Removing the Mozilla still seems lost. I also tried Opera M2 (going over what newsreaders I remember) and it fails on NEWGROUPS. |
FWIW a hokey NEWGROUPS could just ignore the args and return what LIST ACTIVE does: diff --git a/nntpit.c b/nntpit.c
index 00e0cf2..3cc1798 100644
--- a/nntpit.c
+++ b/nntpit.c
@@ -727,6 +727,8 @@ void client_read(struct ev_loop *loop, ev_io *w, int revents)
if (strcasecmp(cmd, "LIST") == 0) {
handle_list_cmd(cl, data);
+ } else if (strcasecmp(cmd, "NEWGROUPS") == 0) {
+ handle_list_cmd(cl, "ACTIVE");
} else if (strcasecmp(cmd, "GROUP") == 0) {
handle_group_cmd(cl, data);
} else if (strcasecmp(cmd, "HEAD") == 0) { |
Okay, I added a quick newgroups stub. XOVER might take a little longer, but that should be fine too. |
OH - I missed that you sent me a PR to do the same thing, sorry about that! |
FWIW, MicroPlanet Gravity has the same behaviour as Outlook Express (try XOVER, fall back to XHDR). |
I looked into what seems to be preventing Thunderbird from working, other than listing groups (for that I just connected raw to nntpit and issued It seems Thunderbird doesn't like if the low water mark is zero - it skips here from processing the articles. This results in a log like the following (
Note
The following very hacky patch allows Thunderbird to at least retrieve and display most articles, but there is some fencepost error where Thunderbird thinks that there is an article at diff --git a/nntpit.c b/nntpit.c
index 803c461..659a893 100644
--- a/nntpit.c
+++ b/nntpit.c
@@ -573,8 +573,8 @@ void handle_group_cmd(client_t *cl, const char *param)
client_printf(cl, "211 %d %d %d %s\r\n",
highwm - lowwm,
- lowwm,
- highwm,
+ lowwm + 1,
+ highwm + 1,
param);
client_flush(cl);
@@ -675,7 +675,7 @@ void handle_head_cmd(client_t *cl, const char *param, bool head, bool article)
}
} else {
json_object_object_foreach(groupset, msg, artnum) {
- if (json_object_get_int(artnum) == number) {
+ if (json_object_get_int(artnum) + 1 == number) {
// Now we lookup that id in the spool file.
if (!json_object_object_get_ex(spool, msg, &object)) { Overall it needs you two who are much more knowledgeable about NNTP to take a look at, but that's at least the right direction I think. This is with Thunderbird 68.9.0 for what it's worth. |
I think the 0 mark is reserved for if it doesn't know what an article is (like if you request headers with |
The hacky patch allows me to retrieve posts in Thunderbird (after having used slrn to subscribe first). But every time I click on a message I get a prompt asking me Is there any way to disable this in either Thunderbird of the code? I'm not sure what's going on with this (or if it is even related to the previous issue), but right now it seems to be the only remaining thing keeping nntpit from being comfortable to use for me. |
With the latest changes, the subscription prompt no longer seems to be an issue. The threading hierarchy is quite messed up, but I assume that is caused by the hacky patch above (without which I am unfortunately still unable to retrieve messages). |
I'll try out thunderbird today and see if I can figure out what's going on, it's possibly it's just being very strict about the syntax and we can make it work. |
(I think I was calculating the watermark incorrectly, and slrn is just very forgiving so I didn't notice!) |
Awesome! I indeed no longer require the hacky patch, and I seem to be getting the correct first messages of a hierarchy. What I'm still getting now is that most threads are put under other other threads: The threads in the screenshot: Gonna subscribe to a new subreddit, just in case this is just a relic from working with the hacky patch before. |
Hmm - I see what you mean, that's confusing. The Xrefs all seem well-formed to me... I'll see if I can figure it out. |
This is neat; been meaning to write something like this for older systems. Curious how vintage NNTP clients handle it (since I'm curious about the retro applications), and so far, none of them like it:
The text was updated successfully, but these errors were encountered: