Commit graph

1434 commits

Author SHA1 Message Date
Mouse Reeve a166af9990
Merge branch 'main' into report-actions 2023-08-06 16:00:59 -07:00
Mouse Reeve b7e7867b9b
Merge pull request #2938 from jderuiter/redirect-referer
On readthrough, progressupdate or status delete return to previous page
2023-08-06 15:41:26 -07:00
Joeri de Ruiter 2dddb2e3da Revert change to redirect when deleting status 2023-08-03 13:18:35 +02:00
Mouse Reeve 173d0b77ac
Merge pull request #2937 from jderuiter/create-book-fixes
Fixes for create-book
2023-08-01 19:02:33 -07:00
Mouse Reeve 211b60bba2
Merge pull request #2934 from bookwyrm-social/reduce-status-tasks
Only trigger add_status_task when status is first created
2023-08-01 08:30:43 -07:00
Joeri de Ruiter d1bad521e9 When deleting readthrough, progressupdate or status, return to referer instead of main page 2023-08-01 17:19:10 +02:00
Joeri de Ruiter 220cad8661 Only show author confirmation if new authors are added, show suggestions for parent work and set it correctly. 2023-08-01 15:12:50 +02:00
Mouse Reeve f6fba19ac4 Only trigger add_status_task when status is first created
I think the reason I didn't do this initially was so that related users
and books, which are added necessarily after the model instance is
crated, will be part of the object when the task runs, but I have
investigated this and because of the transaction.atomic statement in the
to_model method in bookwyrm/activitypub/base_activity.py and in the
status view (added in this commit), this is not an issue.
2023-07-31 17:23:57 -07:00
Joachim 928d56b566 Fix function docstring 2023-07-31 22:15:09 +02:00
Joachim e37ed8ea5e Remove links trailing punctuation 2023-07-31 22:12:37 +02:00
Mouse Reeve c4d72829e9
Merge pull request #2879 from bookwyrm-social/reactivation-bug
Don't allow invalid account reactivation
2023-07-20 19:07:18 -07:00
Mouse Reeve c947360da8
Merge pull request #2910 from WesleyAC/no-unauthed-remote-profile-view
Don't show remote profiles to unauthenticated users
2023-07-20 19:06:50 -07:00
Wesley Aptekar-Cassels aae1d10eea Don't show remote profiles to unauthenticated users 2023-07-20 20:29:08 -04:00
Wesley Aptekar-Cassels 3e78e398c0 Switch from priority queues to function-based queues
Fixes: #2907
2023-07-20 12:25:30 -04:00
Mouse Reeve 0818d5aabb
Merge branch 'main' into report-actions 2023-07-16 07:13:42 -07:00
Mouse Reeve d56b9f14a2 Handles changing user perms from report 2023-07-16 06:36:32 -07:00
Mouse Reeve a7e6919b96 Fixes confirm email slow and adds test 2023-07-16 05:55:38 -07:00
Mouse Reeve 11f1a4662e Don't allow invalid account reactivation 2023-06-21 15:47:20 -07:00
Jascha Ezra Urbach a601be4708
Merge branch 'main' into 2678 2023-06-01 16:53:28 +02:00
Mouse Reeve c6d23ba26a Record statuses deleted in reports 2023-05-30 11:35:47 -07:00
Mouse Reeve ca3054fdac
Merge pull request #2827 from hughrun/2571
Retain subjects and authors when new book form fails validation
2023-05-30 10:51:52 -07:00
Mouse Reeve aec99ba173
Merge pull request #2862 from kvibber/rssdate
Add dates to RSS feeds and sort by most recent first
2023-05-30 10:36:01 -07:00
Mouse Reeve a4ccd45537
Merge pull request #2812 from hughrun/gts
Fix federation with GoToSocial and inconsistent KeyId in headers
2023-05-29 19:54:00 -07:00
Kelson Vibber 70679856bd apply linter 2023-05-28 22:42:37 -07:00
Kelson Vibber c21d580fd8 sort feed by most recent 2023-05-28 22:38:53 -07:00
Kelson Vibber 98f5cd9393 apply linting 2023-05-28 22:25:01 -07:00
Kelson Vibber 637e0376d4 rss dates 2023-05-28 21:55:26 -07:00
Mouse Reeve affaf3d0ba Fixes tests and incorrect class method reference 2023-05-22 06:39:23 -07:00
Mouse Reeve b3a519c082 Converts report "comments" into broader "actions" table
This table will now track all actions taken on a report, like resolving
it, re-opening it, suspending the reported user, et cetera, in addition
to comments. When there are multiple admins, this change will make it
easier to understand what actions have been taken by whom on a report.
2023-05-16 11:00:33 -07:00
Mouse Reeve 912e92bacd Show all (not just open) reports when linked from user admin 2023-05-07 09:50:24 -07:00
Hugh Rundle 5c9b962639 retain additional authors on form failure when editing book 2023-04-29 09:42:57 +10:00
Mouse Reeve 7bd9623b68
Revert "Increase Celery ping timeout for monitoring page" 2023-04-25 18:24:23 -07:00
Zach Flanders a3013c6224 updating list view 2023-04-25 00:20:54 -05:00
Zach Flanders 21d9cb5fe5 updating shelf view 2023-04-25 00:15:58 -05:00
Jascha Urbach 0cae89b2b6
Update wellknown.py
./bw-dev black
2023-04-16 17:30:27 +02:00
Jascha Urbach f3b1b1d8e4
Fix language constant to show correct lang in API
api/v1/instance had "en" hardcoded as language. This fix takes LANGUAGE_CODE from settings.py/.env and takes the first two letters as response.
2023-04-16 17:28:05 +02:00
Hugh Rundle 5f5886edea Actually fix ensure_transient_values_persist call
oops
2023-04-16 19:58:53 +10:00
Hugh Rundle 6f025af99f fix ensure_transient_values_persist call 2023-04-16 19:06:04 +10:00
Hugh Rundle 74f08323d1
Merge branch 'main' into 2571 2023-04-16 18:11:39 +10:00
Hugh Rundle fb3cb229e9 Fixes #2571
Persist book.subjects and add_author when form validation fails.

This does not resolve the problem of cover image uploads being dropped because this is a broader problem and is covered separately in #2760
(we should investigate the plugin ` django-file-resubmit`)
2023-04-16 17:58:03 +10:00
Mouse Reeve 290b740392
Merge pull request #2805 from WesleyAC/stop-ignoring-task-results
Stop ignoring task results
2023-04-15 09:03:43 -07:00
Hugh Rundle a0b7112c9c
Merge branch 'main' into gts 2023-04-14 18:24:02 +10:00
Hugh Rundle 56a062d01f pylint fixes 2023-04-13 20:21:35 +10:00
Hugh Rundle a6676718cb formatting 2023-04-13 13:27:51 +10:00
Wesley Aptekar-Cassels 8e25ae34d6
Merge pull request #2782 from ranok/list_fix
Small quality of life improvements to list handling
2023-04-11 12:31:58 -04:00
Hugh Rundle 03f21b0f35 Use correct keyId with legacy fallback
Bookwyrm keyIds are at `userpath/#main-key`, however when signing AP objects we have claimed in the headers that the keyId is at `userpath#main-key`.
This is incorrect, and makes GoToSocial's strict checking break.
Simply updating the signatures to use the correct KeyId breaks legacy Bookwyrm's signature checks, becuase it assumes that the keyId path is the same as the user path plus a fragment.
This commit allows for either option, by sending the request a second time with the incorrect keyId if sending with the correct one causes an error.
2023-04-11 15:45:06 +10:00
Hugh Rundle 49758f2383 formatting fixes 2023-04-10 17:50:25 +10:00
Hugh Rundle 632e3844b9 Don't assume user id is key id minus fragment
Fixes #2801
Related to #2794

It is legitimate to use any url for the user's key id. We have been assuming this id is the user id plus a fragment (#key-id) but this is not always the case, notably in the case of GoToSocial it is at /key-id. This commit instead checks the remote user's information to see if the key id listed matches the key id of the message allegedly received from them.

Whilst troubleshooting this it also became apparent that there is a mismatch between Bookwyrm users' keyId and the KeyId we claim to be using in signed requests (there is a forward slash missing). Since everything after the slash is a fragment, this usually slips through but we should be consistent so I updated that.
2023-04-10 17:32:49 +10:00
Wesley Aptekar-Cassels 1048638e30 Stop ignoring task results
This is essentially a revert of 9cbff312a. The commit was at the advice
of the Celery docs for optimization, but I've since decided that the
downsides in terms of making things harder to debug (it makes Flower
nearly useless, for instance) are bigger than the upsides in performance
gain (which seem extremely small in practice, given how long our tasks
take, and the number of tasks we have).
2023-04-07 21:51:44 -04:00
Mouse Reeve d033848d3f
Merge pull request #2780 from jsoref/spelling
Spelling
2023-04-07 06:30:16 -07:00