Rocksolid Light

Welcome to RetroBBS

register   nodelist   faq  


rocksolid / rocksolid.nodes / Re: Flarum thread

SubjectAuthor
* Re: Flarum threadRetro Guy
`- Re: Flarum threadanonymous

Subject: Re: Flarum thread
From: retro_guy@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: novabbs
Date: Sun, 11 Aug 2019 01:56 BST
On Sat, 10 Aug 2019 15:55:44 -0000 (UTC)
anonymous@def2.anon (anonymous) wrote:

and they used to have webhooks, which were sending new posts to other
http servers as POST requests. man, a web interface parsing that POST
request and sending it to the news server is a cakewalk, i have
practically all the code laying around for that.

https://gitlab.com/postmill/Postmill/wikis/webhooks

So would it be correct that the POST request can be to a php (or other
file) on the same host, that can then communicate with the nntp server?

The POST request could contain each header line required, and a body?
That would be easy to work with if received by a php file.

Retro Guy

--
Posted via novabbs


Subject: Re: Flarum thread
From: anonymous@def2.anon (anonymous) (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2org
Date: Sun, 11 Aug 2019 12:29 BST
So would it be correct that the POST request can be to a php (or other
file) on the same host, that can then communicate with the nntp server?

This is what I understood, yes.

The POST request could contain each header line required, and a body?
That would be easy to work with if received by a php file.

This is the structure, as published on the site that I linked:

{
    "event": "new_submission",
    "subject": {
        "resource": "https://example.com/f/example/420/smoke-weed",
        "id": 420,
        "forum": "https://example.com/f/example",
        "user": "https://example.com/user/emma",
        "title": "Smoke weed!",
        "body": "its good for your soul",
        "url": "https://foo.example.com/",
        "timestamp": "2018-04-20T06:09:00+00:00",
        "locked": false,
        "sticky": false,
        "user_flag": "moderator",
        "edited_at": "2018-06-09T04:21:09+00:00",
        "moderated": false,
        "comment_count": 0,
        "upvotes": 0,
        "downvotes": 0,
        "thumbnail_1x": "https://example.com/very_long_image_url.jpg",
        "thumbnail_2x": "https://example.com/very_long_image_url_2x.jpg"
    }
}

I guess that is all you would need to pipe the message to inn2 (via php or cgi). Really easy.

cheers

trw
Posted on def2


1
rocksolid light 0.6.4d
clearnet i2p tor