Commit Graph

40 Commits

Author SHA1 Message Date
Daniel Sockwell 8797a47efd
Stop filtering out toots with language set to `""` (#100)
Previously, if a toot's language was `null`, then it would be
permitted regardless of the user's language filter; however, if it
were `""` (the empty string) it was rejected.  Now, the empty string
is treated like `null` and the toot is allowed.
2020-03-20 15:43:50 -04:00
Daniel Sockwell eda52c20b1
Add additional info logging (#98) 2020-03-19 20:54:23 -04:00
Daniel Sockwell 2096e1348b
Add support for announcement event type (#96) 2020-03-19 13:20:48 -04:00
Daniel Sockwell dc6256d521
Fix double-escaping of delete payload (#95) 2020-03-19 12:10:59 -04:00
Daniel Sockwell 8843f18f5f
Fix valid language (#93)
* Fix panic on delete events

Previously, the code attempted to check the toot's language regardless
of event types.  That caused a panic for `delete` events, which lack a
language.

* WIP implementation of Message refactor

* Major refactor

* Refactor scope managment to use enum

* Use Timeline type instead of String

* Clean up Receiver's use of Timeline

* Make debug output more readable

* Block statuses from blocking users

This commit fixes an issue where a status from A would be displayed on
B's public timelines even when A had B blocked (i.e., it would treat B
as though they were muted rather than blocked for the purpose of
public timelines).

* Fix bug with incorrect parsing of incomming timeline

* Disable outdated tests

* Bump version
2020-03-18 20:37:10 -04:00
Daniel Sockwell 440d691b0f
Filter toots based on user and domain blocks (#89)
* Read user and domain blocks from Postgres

This commit reads the blocks from pg and stores them in the User
struct; it does not yet actually filter the responses.  It also does
not update the tests.

* Update tests

* Filter out toots involving blocked/muted users

* Add support for domain blocks

* Update test and bump version
2020-03-12 22:44:31 -04:00
Daniel Sockwell ed75905fa3
Increase verbosity of debug info (#86)
* Increase verbosity of debug info

* Add email field to User in tests
2020-03-11 11:31:29 -04:00
Daniel Sockwell 405b5e88e5
Update logging (#85)
* Change "Incoming" log msgs from Warn to Info

* Stop logging err when unix socket closed

* Bump version to 0.4.7
2020-01-10 17:56:19 -05:00
Daniel Sockwell ac75cb54af
Postgres connection pool (#84)
* Upgrade rust-postgres library

* Initial postgres connection pool

* Update tests

* s/pg_conn/pg_pool to match reality
2020-01-10 15:45:16 -05:00
Daniel Sockwell 5482be9414
Fix dev dependencies for benchmarks (#82) 2020-01-09 18:17:01 -05:00
Daniel Sockwell 0462267125
Unix sockets (#81)
* Fix unix socket permission issue

* Add support for Unix sockets

* Update README and bump version
2020-01-09 17:54:57 -05:00
Daniel Sockwell 67c59401fd
Unix sockets WIP (#77)
* Initial WIP Unix socket implementation

* Bump version to v0.4.5

* Update type data
2020-01-08 09:51:25 -05:00
Daniel Sockwell bf529a901b
Treat env vars set to "" as if they were unset (#73)
* Treat env vars set to "" as if they were unset

* Bump version to 0.4.4
2020-01-07 13:07:54 -05:00
Daniel Sockwell 07e8776090
Redis hostname (#71)
* Allow hostname in REDIS_HOST

* Bump version to 0.4.3
2020-01-06 14:20:00 -05:00
Daniel Sockwell 0de3d3c484
Postgres config (#70)
* Add logging for known env variables

* Update postgres config to match other configs

* Update README and bump version to 0.4.2
2020-01-05 21:58:18 -05:00
Daniel Sockwell 4a2d08c693
Refactor/reorganize streaming code (#64) 2019-10-09 14:46:56 -04:00
Daniel Sockwell c281418f25
Enforce type safety in config (#63)
* Add type-safe wrapper types to deployement_cfg

* Before deleting redundnat macros

* Store error messages as data

* Significant progress on type safety

* Add type safety to RedisConfig
2019-10-08 20:35:26 -04:00
Daniel Sockwell e19524738b
Add WS keepalive ping (#62)
* Modify code to use forked Warp

* Add keepalive WS ping
2019-10-05 18:18:11 -04:00
Daniel Sockwell 9d96907406
Functional config (#59) 2019-10-03 18:02:23 -04:00
Daniel Sockwell e8145275b5
Config refactor (#57)
* Refactor configuration

* Fix bug with incorrect Host env variable

* Improve logging of REDIS_NAMESPACE

* Update test for Postgres configuration

* Conform Redis config to Postgres changes
2019-10-03 00:34:41 -04:00
Daniel Sockwell 11661d2fdc
Redis config (#56)
* Add most Redis config variables

* Add REDIS_NAMESPACE env var

* Fix Clippy lints
2019-10-02 00:03:18 -04:00
Daniel Sockwell 5b663d110e
Unicode fix (#54)
* Increase detail of error logging; bump version

* Fix panic caused by spliting a message inside a Unicode char
2019-10-01 09:28:43 -04:00
Daniel Sockwell ceb38c2689
Add initial benchmarks (#50) 2019-09-11 17:28:27 -04:00
Daniel Sockwell 0dec8c4124
Solve SendErrors (#47)
This commit solves the SendErrors that were triggered by attempting
to use a WebSocket connection after it had been closed by the client
2019-09-11 00:13:45 -04:00
Daniel Sockwell 11163237bc
Prepare binary release (#46) 2019-09-10 12:11:09 -04:00
Daniel Sockwell 7fb7a3e5c9
Temporarily remove Postgres SSL support (#45)
Remove Postgres SSL support, which was not working at the moment and
was preventing flogatt from running on servers without openssl.

We should re-enable SSL support at a later time.
2019-09-10 11:46:05 -04:00
Daniel Sockwell 0a8abde664
Read `access_token` from WS header (#44) 2019-09-10 08:51:36 -04:00
Daniel Sockwell ecfdda093c
Add tests for websocket routes (#38)
* Refactor organazation of SSE

This commit refactors how SSE requests are handled to bring them into
line with how WS requests are handled and increase consistency.

* Add websocket tests

* Bump version to 0.2.0

Bump version and update name from ragequit to flodgatt.

* Add test for non-existant endpoints

* Update documentation for recent changes``
2019-09-09 13:06:24 -04:00
Daniel Sockwell a27fb0d605
Postgres ssl (#36)
* Upgrade postgres dependency to support ssl

* Clean up configuration code

* Add support for SSL with postgres [WIP]
2019-09-04 21:31:52 -04:00
Daniel Sockwell 866f3ee34d Update documentation and restructure code 2019-07-08 15:21:02 -04:00
Daniel Sockwell 769af09221 Remove outdated files and update dependencies 2019-05-10 06:23:07 -04:00
Daniel Sockwell 9e921c1c97 Add ability for multiple clients to connect to the same pub/sub connection 2019-04-28 17:28:57 -04:00
Daniel Sockwell 13d9cf17f6 Connect to postgres for basic auth 2019-04-18 15:47:08 -04:00
Daniel Sockwell 9434260fa7 Add logging with `pretty_env_log`
This commit adds basic logging at both the `info` level (for establishing
a new stream) and at the `debug` level (for streaming JSON).
2019-04-18 10:10:01 -04:00
Daniel Sockwell 36f9d1d7c1 Add dependencies neccessary for SSE/Warp 2019-04-15 14:48:09 -04:00
Julian Laubstein dfafec963b Added structures for env variables 2019-02-19 20:29:32 +01:00
Julian Laubstein 88492aac36 Lots of basic stuff 2019-02-15 10:22:35 +01:00
Julian Laubstein 524935c441 Added all routes as mock 2019-02-11 21:00:07 +01:00
Julian Laubstein 1339784112 Added all endpoints 2019-02-11 18:58:51 +01:00
Julian Laubstein 7caa714891 Initial project files 2019-02-11 09:45:14 +01:00