furbooru / philomena

Next-generation imageboard (furry edition)
https://furbooru.org/
GNU Affero General Public License v3.0
14 stars 3 forks source link

philomena_web: hack in forum posts to the firehose #2

Closed Xe closed 4 years ago

Xe commented 4 years ago

Before you begin


This adds firehose support for forum posts. This will be used by Tron to power some of the automatic racially charged term detection, but is being implemented generically enough that it should be useful to other users too. The schema of the post:create messages looks like this:

key docs why
post https://furbooru.org/pages/api#post-response The post body and other metadata are useful for this functionality
topic https://furbooru.org/pages/api#topic-response The post type does not include this information, which is needed to build URLs
forum https://furbooru.org/pages/api#forum-response The post type does not include this information, which is needed to build URLs

This creates payloads that look like this:

2020-07-03-231232_465x445_scrot

This triggers on post creation and on topic creation. It may be a good idea to have this trigger on post editing too.

I believe that this information is the minimum amount of information required in order for this functionality to work.


This is also my first time contributing to a project written in Elixir.