Commit graph

181 commits

Author SHA1 Message Date
Bart Schuurmans 5cfe7eca6f Add index for finding all statuses in a thread 2024-04-03 21:11:09 +02:00
Bart Schuurmans 4bbdd0b2d0 Add index on Status.remote_id
This field is often used in WHERE-clauses in queries that are very slow on bookwyrm.social.
2024-04-02 21:54:30 +02:00
Mouse Reeve faf45cf956
Merge pull request #3273 from bookwyrm-social/WesleyAC-freeform-page-number
Allow page numbers to be text, instead of integers
2024-02-03 08:00:34 -08:00
Mouse Reeve e0667c6a03
Merge pull request #3237 from Minnozz/status-title-description
Improve OpenGraph tags for status and book pages
2024-02-03 07:37:00 -08:00
Adeodato Simó 8ac873419f
refactor: eagerly use a set in recipients, get_recipients 2024-01-26 06:29:59 -03:00
Bart Schuurmans eb6bea013f Fix pylint warning 2024-01-21 11:04:08 +01:00
Bart Schuurmans 646b27b7a7 OpenGraph: fall back on book cover when preview images are disabled 2024-01-20 17:34:52 +01:00
Bart Schuurmans ad56024ffe Add Status.page_image property 2024-01-20 17:34:52 +01:00
Bart Schuurmans f7b4d9ea50 Give individual status page a title and OpenGraph description 2024-01-20 17:34:52 +01:00
Wesley Aptekar-Cassels 6cd2c91135 Allow page numbers to be text, instead of integers.
Fixes: #2640
2024-01-04 19:09:39 -05:00
Mouse Reeve 5e42afd85a Pass args and kwargs through status deletion 2023-11-05 08:10:03 -08:00
Adeodato Simó 80a1180090
Include author name when serializing Quotation 2023-09-25 16:03:16 -03:00
Adeodato Simó cc05cabcb5
Note content: use italics for book titles + em-dash for Quotation 2023-09-23 17:49:38 -03:00
Adeodato Simó ce3885d4f6
Use endposition when serializing Quotation 2023-09-17 15:18:48 -03:00
Adeodato Simó 1322a0c693
Substitute “p.” for “page” in page progress serialization 2023-09-17 15:18:21 -03:00
Adeodato Simó 25fd7276ea
pure_content() refactor: shorter conditionals 2023-09-17 15:01:04 -03:00
Hugh Rundle a0b7112c9c
Merge branch 'main' into gts 2023-04-14 18:24:02 +10:00
Hugh Rundle a6676718cb formatting 2023-04-13 13:27:51 +10:00
Hugh Rundle e3261c6b88 fix incoming GTS mentions and DMs
GoToSocial sends 'tag' values as a single object if there is only one
user mentioned, rather than an array with an object inside it.

This causes Bookwyrm to reject the tag since it comes through as a
dict rather than a list.

This commit fixes this at the point the incoming AP object is transformed
so that "mention" tags are turned into a mention_user.
2023-04-13 13:21:05 +10:00
Hugh Rundle c450947eee update comment to identify bug 2023-04-11 18:57:55 +10:00
Hugh Rundle 279fa3851b add comment 2023-04-11 16:49:11 +10:00
Hugh Rundle ef85394a16 Allow for tag value to be object
Previously the 'tag' value in an activitypub object was assumed to be a List (array).
Some AP software sends 'tag' as a Dict (object) if there is only a single tag value.
It's somewhat debatable whether this is spec compliant but we should aim to be robust.
This commit puts an individual mention tag inside a list if necessary.
2023-04-10 20:35:13 +10:00
Wesley Aptekar-Cassels b574a12fff Pass allow_external_connections through ignore_activity
Previously, ignore_activity could unexpectedly make a outgoing HTTP
connection, leading to unwanted latency, particularly when called via
ActivityObject.to_model, which had the allow_external_connections
parameter already.

Related: #2717
2023-04-06 23:37:49 -04:00
Christof Dorner c68304a99b Parse hashtags and store them in CreateStatus view 2023-03-07 12:55:36 +01:00
Giebisch 248eab22ed Merge branch 'main' into page-range 2023-02-06 14:02:05 +01:00
Giebisch f085315d70 Added Backend Part 2023-01-30 16:12:14 +01:00
0x29a cbd75dc766 Minor performance improvements 2023-01-27 20:24:53 +01:00
Mouse Reeve 317cf5fcf5 Generate fewer add_status_tasks
Previously, every time a status was saved, a task would start to add it
to people's timelines. This meant there were a ton of duplicate tasks
that were potentially heavy to run. Now, the Status model has a "ready"
field which indicates that it's worth updating the timelines. It
defaults to True, which prevents statuses from accidentally not being
added due to ready state.

The ready state is explicitly set to false in the view, which is the
source of most of the noise for that task.
2022-11-15 14:14:32 -08:00
Hugh Rundle 0ad3dc6245 allow 0.5 star ratings 2022-09-10 07:24:11 +10:00
Mouse Reeve 639b727c92 Fixes perms check for ratings 2022-07-17 16:21:43 -07:00
Hugh Rundle 4de9989d8e add page numbers to comment and quote statuses
This adds the page number for quote and comment statuses where a page number is provided:

- all ActivityPub posts
- Explore cards for comments (quotes already have the page number)

This responds to #2136
2022-06-05 16:02:25 +10:00
Mouse Reeve fc3b609ada Use general ratings rather than privacy filtered
The original system customized how a rating is displayed to every user
based on the privacy settings of the reviews and, relatedly, who the
user follows. This is cool, but the query is too complicated to load in
sessions, and the initial load, which isn't mitigated by caching, is too
much and causes timeouts for many users. Also the cache clearing wasn't
working correctly because I put in a wildcard, which does not work.
2022-05-30 08:42:48 -07:00
Mouse Reeve 77a7dfa924
Merge pull request #2133 from bookwyrm-social/activitypub-connection-erorr
Don't throw an error when unable to connect to remote data
2022-05-26 10:12:18 -07:00
Mouse Reeve 9d275db322 Updates ignore boost logic that no longer produces errors 2022-05-26 09:57:39 -07:00
Thomas Versteeg 539775f370 Merge remote-tracking branch 'upstream/main' into partially-read-shelf 2022-02-28 20:44:55 +01:00
Mouse Reeve 374dd24fa8 Remove reviews from deleted users 2022-02-28 10:47:08 -08:00
Thomas Versteeg c88b34814f Rename 'Partially Read' to 'Stopped Reading' 2022-02-12 19:49:54 +01:00
Thomas Versteeg 2b27889457 Add 'Partially Read' shelf 2022-02-11 14:33:46 +01:00
Mouse Reeve 02dd1e9443 Use False instead of None for test values 2022-01-17 12:45:32 -08:00
Mouse Reeve 1e4aee8276 Cache user-specific ratings 2022-01-17 12:17:24 -08:00
Mouse Reeve 7df99afdc7 Cache status interact buttons 2022-01-05 14:54:51 -08:00
Mouse Reeve f22ae23574 Safer call to get preview image or books 2021-11-15 13:34:02 -08:00
Mouse Reeve 717da918cf Use social media preview images 2021-11-10 10:59:21 -08:00
Mouse Reeve d61595abb9 Clearer syntax 2021-11-10 10:50:05 -08:00
Mouse Reeve 9815e9e100 Python formatting 2021-11-10 10:30:18 -08:00
Mouse Reeve 4f5d23e785 Replace image_serialzier helper with built-in serializers 2021-11-10 10:28:43 -08:00
Mouse Reeve eac1ed3484
Merge pull request #1534 from bookwyrm-social/followers-display
Fixes privacy filters for followers-only replies
2021-10-15 13:38:42 -07:00
Mouse Reeve c6caa5a3f4 Fixes privacy display 2021-10-15 13:26:02 -07:00
Mouse Reeve bd0e4abd56 Uses correct model field for raw values 2021-10-15 10:36:46 -07:00
Mouse Reeve 117e6a08b2 Merge branch 'main' into markdown 2021-10-15 10:06:34 -07:00