Commit graph

395 commits

Author SHA1 Message Date
Izalia Mae
0709d8deb9 remove unnecessary ActorView.validate_signature method 2024-03-27 12:52:58 -04:00
Izalia Mae
8ed1daeae5 allow HttpClient.post to accept bytes objects 2024-03-27 12:50:53 -04:00
Izalia Mae
e700f9baa2 use right algorithm for inbox pushes
* return instance rows from distill_inboxes
* pass the row of the instance being POSTed to the instance parameter of HttpClient.post
2024-03-27 12:48:22 -04:00
Izalia Mae
938d3f419e properly detect if running via systemd 2024-03-27 11:48:05 -04:00
Izalia Mae
6112734b2f update aputils to 0.1.9 2024-03-22 03:24:23 -04:00
Izalia Mae
491f19a9cb don't include date in logging when running via systemd 2024-03-21 22:50:22 -04:00
Izalia Mae
a6f1738b73 fix user updating 2024-03-16 06:11:47 -04:00
Izalia Mae
ea0658e2ea don't set csp header on /api routes 2024-03-16 06:10:58 -04:00
Izalia Mae
5c210dc20f fix linting issues 2024-03-16 01:36:20 -04:00
Izalia Mae
b8b6dda131 update theme on change in config admin page 2024-03-15 23:04:41 -04:00
Izalia Mae
98b7e33288 fix editing note in config admin page 2024-03-15 23:00:54 -04:00
Izalia Mae
d579ec634d fix NameError in CachedStaticResource._handle 2024-03-15 22:56:16 -04:00
Izalia Mae
e1ab01e4e2 use api on login page 2024-03-15 22:14:37 -04:00
Izalia Mae
a966f9c1cf replace alerts with in-page toast messages 2024-03-15 21:57:44 -04:00
Izalia Mae
2be96a8ca5 register static route on run 2024-03-15 21:28:40 -04:00
Izalia Mae
6018af1e68 load static files into memory when not in dev mode 2024-03-15 21:24:17 -04:00
Izalia Mae
c961fadc9a don't run relay via dev script in dev mode by default 2024-03-15 21:23:57 -04:00
Izalia Mae
94f4d32314 don't run relay via dev script in dev mode by default 2024-03-15 21:17:20 -04:00
Izalia Mae
f488d661d7 load static files into memory when not in dev mode 2024-03-15 21:15:54 -04:00
Izalia Mae
8b738dd365 removed unused endpoints 2024-03-15 19:52:12 -04:00
Izalia Mae
3114e48371 enable csp headers 2024-03-15 19:47:05 -04:00
Izalia Mae
b068f4f91e move request method out of client class 2024-03-15 06:55:52 -04:00
Izalia Mae
0f3b72830b use cookie auth for frontend 2024-03-15 06:50:08 -04:00
Izalia Mae
50c323ba1e use api for users admin page 2024-03-15 06:46:55 -04:00
Izalia Mae
1ffc609058 add user management api endpoints and allow cookie for api auth 2024-03-15 06:46:31 -04:00
Izalia Mae
08f4f0e72d use api for admin config page 2024-03-15 04:53:43 -04:00
Izalia Mae
31f5decc4a create append_table_row js function 2024-03-15 00:30:04 -04:00
Izalia Mae
ad17fb64f1 use api for whitelist admin page 2024-03-15 00:02:24 -04:00
Izalia Mae
f775335e80 use api for instances admin page 2024-03-14 23:48:22 -04:00
Izalia Mae
aeb84d7a72 use api for software bans admin page 2024-03-14 21:58:40 -04:00
Izalia Mae
17690268bc add ability to update domain bans and re-add domain ban api endpoints 2024-03-14 21:36:47 -04:00
Izalia Mae
10ba039938 minor frontend tweaks and use javascript for managing domain bans 2024-03-14 20:58:16 -04:00
Izalia Mae
9fe6d8ad96 replace pylint with mypy and other minor changes
* ignore test*.py files
* format requirements.txt to be more readable
* only show note on home page if it is set
* allow flake8 to check for more than just unused imports
* remove a bunch of unused methods in `compat.RelayDatabase`
* turn `Config` into a dataclass
* replace database config methods with `RelayData` dataclass
* rename `loads` to `cls` in `HttpClient.get`
2024-03-13 17:43:57 -04:00
Izalia Mae
189ac887a9 minor tweak to data used in admin pages 2024-03-11 03:24:44 -04:00
Izalia Mae
21e0e0a3ec add markdown support for the note setting 2024-03-11 03:17:38 -04:00
Izalia Mae
5b1f244703 actually use signed headers 2024-03-11 02:36:34 -04:00
Izalia Mae
b3ab6e6d40 add message on home page when relay is in manual approval mode 2024-03-11 01:53:12 -04:00
Izalia Mae
d5069d98a6 fix TypeError when a person tries joining 2024-03-11 01:52:28 -04:00
Izalia Mae
c852867636 add option to require approval for new instances 2024-03-11 01:21:46 -04:00
Izalia Mae
1672f7a7eb add missing file 2024-03-10 19:15:59 -04:00
Izalia Mae
0e812c012e fix POST /api/token and prevent scroll bar from always showing 2024-03-05 14:05:54 -05:00
Izalia Mae
e86a376f6e move stylesheet variables to separate file and re-enable cache 2024-03-04 15:29:08 -05:00
Izalia Mae
a0ee22406b don't use spec file when building bin 2024-03-04 05:39:21 -05:00
Izalia Mae
0af6a33b69 use darker text color for active menu item 2024-03-04 02:34:28 -05:00
Izalia Mae
01a491f272 replace target with action in forms 2024-03-04 02:32:57 -05:00
Izalia Mae
5f156401c7 fix linter warnings 2024-03-04 02:30:54 -05:00
Izalia Mae
4cbf83a7b7 simplify css 2024-03-04 02:19:26 -05:00
Izalia Mae
33102f9e4e disable caching for now 2024-03-04 01:42:27 -05:00
Izalia Mae
b73fdece95 create admin users page 2024-03-04 01:40:51 -05:00
Izalia Mae
2223695d15 remove commas in element attributes 2024-03-04 01:14:17 -05:00
Izalia Mae
d44498b966 fix dev mode 2024-03-04 01:09:40 -05:00
Izalia Mae
5dcf375247 create admin whitelist page 2024-03-04 01:00:57 -05:00
Izalia Mae
a163f2baab create admin software bans page 2024-03-04 00:43:12 -05:00
Izalia Mae
d7cfa12145 add Cache-Control header 2024-03-04 00:32:13 -05:00
Izalia Mae
4639d8a78d minor frontend tweaks 2024-03-03 18:28:49 -05:00
Izalia Mae
2a866eaaaa create admin domain bans page 2024-03-03 03:03:32 -05:00
Izalia Mae
e5d8c9dcb0 create admin config page 2024-03-03 00:20:38 -05:00
Izalia Mae
e6831f04eb create admin instances page 2024-03-02 19:58:06 -05:00
Izalia Mae
7af3b9c20b add login/logout and start on admin interface 2024-03-02 17:36:44 -05:00
Izalia Mae
a271cf22b4 check for config in multiple directories 2024-03-02 07:38:48 -05:00
Izalia Mae
0ad0bb0ff5 fix instance table styling and add footer 2024-02-24 08:40:57 -05:00
Izalia Mae
ae490a9bf3 version bump to 0.3.0 2024-02-23 20:58:36 -05:00
Izalia Mae
6a891ccf89 simplify aputils imports 2024-02-23 20:58:24 -05:00
Izalia Mae
6f03e2ad4c fix linter issues 2024-02-23 20:04:31 -05:00
Izalia Mae
cd43aae535 add dev commands 2024-02-23 19:58:35 -05:00
Izalia Mae
a08d1c9612 use jinja for web pages 2024-02-23 19:19:44 -05:00
Izalia Mae
26c5c05320 create get_resource method 2024-02-22 17:54:15 -05:00
Izalia Mae
097a53a539 ensure cache is setup 2024-02-22 13:44:58 -05:00
Izalia Mae
61014f791d re-add windows support 2024-02-22 13:28:41 -05:00
Izalia Mae
001aa87667 replace gunicorn with push worker processes 2024-02-22 11:54:09 -05:00
Izalia Mae
a2ae1bdd21 return correct types for api 2024-02-20 19:22:18 -05:00
Izalia Mae
93797b639e Replace tinysql 2024-02-21 00:00:21 +00:00
Izalia Mae
e156f3e532 remove unnecessary arguemnt for HttpClient.post in cli_inbox_follow 2024-02-18 11:52:16 -05:00
Izalia Mae
091a36a3d8 fix linter warnings 2024-02-18 08:13:52 -05:00
Izalia Mae
c704c1e72c version bump to 0.2.6 2024-02-18 08:08:46 -05:00
Izalia Mae
38ea8b390e ensure int config values are above 0 2024-02-18 08:02:29 -05:00
Izalia Mae
1eb93ab71a fix running via pyinstaller bin 2024-02-16 21:05:12 -05:00
Izalia Mae
c3b4d9ca98 add swagger api docs 2024-02-16 20:25:50 -05:00
Izalia Mae
af1caaf7c9 remove status code from json error message 2024-02-16 10:42:22 -05:00
Izalia Mae
afad948f85 de-uwu api message 2024-02-16 10:39:58 -05:00
Izalia Mae
8f8f38cc4c add thread for cache cleanup 2024-02-15 22:49:55 -05:00
Izalia Mae
aca34825b1 remove unused imports 2024-02-15 22:05:22 -05:00
Izalia Mae
8c85f23c86 cache changes
* add `delete_old`, `clear`, and `close` methods to Cache
* user iterator in `get_keys` and `get_namespace` of RedisCache
2024-02-15 21:57:19 -05:00
Izalia Mae
6f3a1db17d ensure cache, database, and http client are closed on quit 2024-02-15 21:53:46 -05:00
Izalia Mae
b259f2d760 prevent sqlite database from locking up 2024-02-15 20:26:33 -05:00
Izalia Mae
b86159c7ae prevent past unfollows from removing an instance 2024-02-14 15:33:01 -05:00
Izalia Mae
70617fbdf6 start a transaction when runing processors 2024-02-14 15:31:06 -05:00
Izalia Mae
097f3bc896 Add API endpoints for relay management 2024-02-14 20:29:30 +00:00
Izalia Mae
bec5d5f207 use gunicorn to start the server 2024-02-05 13:15:08 -05:00
Izalia Mae
02ac1fa53b make sure db connection for request is open 2024-02-04 05:17:51 -05:00
Izalia Mae
2fcaea85ae create a new database connection for each request 2024-02-04 04:53:39 -05:00
Izalia Mae
64690a5c05 create new Database object for SqlCache 2024-02-04 04:40:51 -05:00
Izalia Mae
46413be2af make sure Item.updated is a datetime object if it isn't one already 2024-02-03 05:40:57 -05:00
Izalia Mae
3d81e5ef68 pass instance row to HttpClient.post 2024-02-01 21:40:27 -05:00
Izalia Mae
1668d96485 add setup questions for redis 2024-02-01 21:37:46 -05:00
Izalia Mae
4c4dd3566b cache fixes
* make sure Item.updated is a datetime object
* remove id column when creating Item objects in SqlCache
2024-02-01 11:43:17 -05:00
Izalia Mae
2d641ea183 add database and redis caching 2024-01-31 21:23:45 -05:00
Izalia Mae
116a04ce4d allow empty password for database setup 2024-01-29 19:55:02 -05:00
Izalia Mae
6ab6343ae7 fix ImportError on python 3.8 2024-01-29 04:26:54 -05:00
Izalia Mae
ed9d423ca3 update tinysql and set min/max db connections per thread 2024-01-27 00:59:08 -05:00
Izalia Mae
b59ead5d05 fix handle_follow and handle_undo 2024-01-24 19:55:11 -05:00
Izalia Mae
b8aae4c1bb use correct url when fetching inbox data 2024-01-24 19:28:15 -05:00
Izalia Mae
85a4797e68 make sure bool(Response) returns True 2024-01-24 19:24:27 -05:00
Izalia Mae
c2aa8c48bb ignore thread warnings in the sqlite backend for now 2024-01-24 19:20:27 -05:00
Izalia Mae
815053c06f fix the convert command 2024-01-24 01:20:23 -05:00
Izalia Mae
e66be009a6 use the right name for the domain_bans table 2024-01-24 01:20:00 -05:00
Izalia Mae
7a9d346642 fix linter warnings 2024-01-23 21:54:58 -05:00
Izalia Mae
57d7d25743 set sqlite file path relative to config path if possible 2024-01-22 06:50:31 -05:00
Izalia Mae
9cc79aa79a actually fix python packaging this time 2024-01-22 06:39:12 -05:00
Izalia Mae
5f6aef1871 use postgresql/sqlite for database backend 2024-01-22 05:32:16 -05:00
Izalia Mae
9808674b98 logging: use LogLevel enum and add functions to set/get the current level 2024-01-21 06:39:49 -05:00
Izalia Mae
3d9ba68bd1 use Message.object_id instead of Message.objectid 2024-01-16 00:33:41 -05:00
Izalia Mae
2ebb295be1 handle TypeError in Message.object_id 2024-01-16 00:33:05 -05:00
Izalia Mae
b9eb67b32d version bump 2024-01-15 23:47:23 -05:00
Izalia Mae
e6f2174ad4 don't use lazy import for aputils 2024-01-15 23:39:50 -05:00
Izalia Mae
9bf45a54d1 add annotations and fix linter warnings 2024-01-14 14:13:06 -05:00
Izalia Mae
3005e9b370 use format strings for logging 2024-01-10 10:49:43 -05:00
Izalia Mae
dcbde6d532 rework logger to not monkey-patch the logging module 2024-01-10 10:49:05 -05:00
Izalia Mae
4feaccaa53 use View class and make Message a subclass of aputils.message.Message 2024-01-09 23:15:04 -05:00
Dmytro Poltavchenko
006efc1ba4 Do not check instance's actor.type in case of Pleroma/Akkoma 2023-01-08 00:23:36 +00:00
Izalia Mae
f4698aa4dc fix RuntimeError when running commands involving http client 2022-12-29 07:27:35 -05:00
Izalia Mae
0940921383 handle more client connection errors 2022-12-26 02:02:57 -05:00
Izalia Mae
17f3e6be55 version 0.2.4 2022-12-08 04:17:17 -05:00
Izalia Mae
0e45763eff remove unnecessary config update 2022-12-08 03:53:13 -05:00
Izalia Mae
3968799d6f make sure exceptions don't bring down workers 2022-12-08 03:51:10 -05:00
Izalia Mae
aa8090eebb don't prompt for ignored settings in docker instances 2022-12-08 03:31:47 -05:00
Izalia Mae
dc74bfb588 force certain config values in docker installs 2022-12-07 23:16:48 -05:00
Izalia Mae
e281a06e7f correctly call aputils.Signer.new 2022-12-07 23:15:54 -05:00
Izalia Mae
8f16cab048 prevent errors in post and fetch_nodeinfo 2022-12-07 23:15:31 -05:00
Izalia Mae
7d37ec8145 remove await from push_message calls and reject non-system actors 2022-12-04 04:40:40 -05:00
Izalia Mae
9f58c88e9f Fix NameError when getting nodeinfo software name in processors 2022-12-04 04:16:50 -05:00
Izalia Mae
6b86bb7d98 remove leftover semaphore property 2022-12-04 02:13:13 -05:00
Izalia Mae
90234a9724 move apkeys out of RelayConfig and rename relay_software_names 2022-12-04 01:20:17 -05:00
Izalia Mae
b0851c0652 remove http_debug 2022-12-04 01:15:28 -05:00
Izalia Mae
3b89aa5e84 sort out cli
added `whitelist import` command which adds all current inboxes to the whitelist
added `config list`
fixed a few errors
2022-12-04 01:09:45 -05:00
Izalia Mae
f7e1c6b0b8 make sure db config is a string when saving 2022-12-02 11:43:39 -05:00
Izalia Mae
dcca1eb0dc fix HttpClient fetch_nodeinfo and get 2022-12-02 00:52:15 -05:00
Izalia Mae
d5b9053f71 replace various classes with aputils classes 2022-12-02 00:50:57 -05:00
Izalia Mae
d172439fac update aputils 2022-12-02 00:11:22 -05:00
Izalia Mae
1a7abb4ecb fix distill_inboxes 2022-11-29 17:41:04 -05:00
Izalia Mae
5397bb4653 only use hs2019 for mastodon 2022-11-27 17:25:54 -05:00
Izalia Mae
a640db8f06 update list of active relay software 2022-11-26 23:41:57 -05:00
Izalia Mae
ce9e0c4d00 remove unnecessary print 2022-11-26 23:11:51 -05:00
Izalia Mae
335146a970 fix NameError in cli_setup 2022-11-26 23:01:18 -05:00
Izalia Mae
5d01211a34 add aputils module for hs2019 support 2022-11-26 22:16:14 -05:00
Izalia Mae
15b314922c fix running via docker 2022-11-26 19:59:20 -05:00
Izalia Mae
b85b4ab80b create HttpClient class to avoid creating a new session every request 2022-11-26 18:56:34 -05:00
Izalia Mae
32764a1f93 make sure domain key exists for inboxes 2022-11-25 13:39:52 -05:00
Izalia Mae
fbe5746a18 fix NameError in cli_whitelist_remove 2022-11-25 13:29:45 -05:00
Izalia Mae
017363ecd5 fix nodeinfo fetching in run_processor 2022-11-25 13:19:29 -05:00