Commit graph

113 commits

Author SHA1 Message Date
Mouse Reeve ae51dcec63
Merge pull request #3039 from dato/ap_image_url
Fix creation of covers for ActivityPub imports
2023-11-02 14:44:44 -07:00
Adeodato Simó 3251ef0bf5
Fix creation of covers for ActivityPub imports
`cover` comes as a JSON dict, but the code was looking for URL as
an attribute.

(This commit leaves the attribute access in place, just in case
`cover` is updated to serialize as Document proper.)
2023-10-16 17:43:04 -03:00
Adeodato Simó c02306a66b
Default to Jan 1st too on incomplete dates received from ActivityPub 2023-10-15 19:59:51 -03:00
Joeri de Ruiter 8736f2c6ef Remove '@' from the beginning of hashtag names in activity 2023-07-28 11:20:08 +02: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 c9dcd4f7ad Include initial '@' in mention tag name
GoToSocial expects the 'name' value of a mention tag to have an initial '@' symbol. Mastodon doesn't seem to mind either way.
2023-04-10 20:38:20 +10:00
Josh Soref c216937dc4 spelling: massively
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref f6a6cb281b spelling: different
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref 319be60c80 spelling: assigning
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Christof Dorner 11640f986e Import hashtags from activitypub statuses 2023-03-07 12:59:31 +01:00
Christof Dorner c68304a99b Parse hashtags and store them in CreateStatus view 2023-03-07 12:55:36 +01:00
Mouse Reeve 216be2aeea Fixes pylint complaints
"fixes" as in silences, sorry
2023-02-20 12:24:53 -08:00
Mouse Reeve 779d2b0694 Attempt to complete inbox requests synchronously
When an inbox activity comes in from another fediverse instance, the
behavior prior to this commit was always to immediately give a 200
response to the external server and then create a celery activity
(usually in the MEDIUM_PRIORITY queue) to complete it.

Instead, this would receive a request and try to complete it without
making any http requests (which would make the request take too long to
process). If an external request is required to complete the activity, a
task is created and added to the queue.

Ideally, this will cause some tasks to happen very promptly, and reduce
the load on celery, which would help queued tasks happen more quickly as
well.

One downside is that this will make completing http requests from
external servers slowing (since it's doing a bunch of thinking before
responding).
2023-02-20 11:05:18 -08:00
Mouse Reeve 8951628e02 Don't try to markdownify a null field 2022-12-05 15:12:53 -08:00
Mouse Reeve fe7163be33 Render markdown to html when using activitypub
This will produce better federated results outside of bookwyrm, and will
still display correctly within bookwyrm
2022-11-17 11:05:48 -08:00
Mouse Reeve 7f78140015 Uses library for html cleanup 2022-07-04 13:21:13 -07:00
Mouse Reeve 9921a1e754 Various pylint complaince fixes 2022-04-08 14:23:37 -07:00
Mouse Reeve 90277a1697 Avoid new pylint complaint 2022-03-26 10:07:06 -07:00
Mouse Reeve 754e24812b Check image extensions before saving 2022-02-01 21:18:25 -08:00
Mouse Reeve d74360a13f Merge branch 'main' into book-file-links 2022-01-12 17:14:27 -08:00
Mouse Reeve 8b2335c52c Build-in translations to privacy choices dropdwon 2022-01-12 15:26:13 -08:00
Mouse Reeve 4f576b77a0 Use urlfield 2021-12-15 12:46:10 -08:00
Mouse Reeve 3a7f070a79 Typo fix 2021-11-28 08:50:29 -08:00
Mouse Reeve 54cef421e2 Fixes checking if image fields are already set 2021-11-28 07:57:27 -08:00
Mouse Reeve 717da918cf Use social media preview images 2021-11-10 10:59:21 -08:00
Mouse Reeve 4f5d23e785 Replace image_serialzier helper with built-in serializers 2021-11-10 10:28:43 -08:00
Joachim b956b79bd0 Add full URL generation to image_serializer 2021-10-27 18:56:37 +02:00
Joachim 35bd4a4071 Apply review suggestion 2021-10-27 18:13:47 +02:00
Mouse Reeve 9d4e0851a0
Merge branch 'main' into image-absolute-url-getter 2021-10-20 15:12:06 -07:00
Mouse Reeve 08f6a97653 Python formatting 2021-09-18 11:33:43 -07:00
Mouse Reeve acfb1bb376 Updating string format synatx part 2 2021-09-18 11:32:00 -07:00
Mouse Reeve 082c2708a7 Fixes attribution field logic 2021-08-29 08:50:46 -07:00
Mouse Reeve 8c8b1168d4 Support attribution field on boosts 2021-08-29 08:22:14 -07:00
Mouse Reeve 9eea60b35c Fixes call to followers url in serialization 2021-08-29 07:36:59 -07:00
Mouse Reeve a5dcc0e5e4 Support multiple possible fields that indicate user ownership 2021-08-28 12:11:15 -07:00
Mouse Reeve 2c26b04119 Uses correct object to determine author 2021-08-28 11:30:54 -07:00
Mouse Reeve 53d9ff87d9 Look up followers url to determine post privacy 2021-08-28 10:40:52 -07:00
Mouse Reeve ad0fff7030 Prevent overwriting data on import form outside data source 2021-08-17 10:08:07 -07:00
Joachim c1673ef717 Update fields.py 2021-08-04 19:25:19 +02:00
Joachim 0db3512eb3 Revert previous commit 2021-08-04 19:21:56 +02:00
Joachim ee39e8c036 Fix R0201: Method could be a function (no-self-use) 2021-08-04 19:16:24 +02:00
Joachim c6f8236b07 Fix tests 2021-08-04 19:11:57 +02:00
Joachim bc7710a4a7 Update Status Model Test 2021-08-04 18:18:18 +02:00
Joachim 60e805ac2b Fix tests 2021-08-04 17:39:46 +02:00
Joachim 7a716db48a lint 2021-08-04 16:56:07 +02:00
Joachim b8b491bbf2 Add get_absolute_url to ImageField 2021-08-04 16:55:12 +02:00
Mouse Reeve ebc0680288 Fixes logic error in detecting changed fields when serializing 2021-08-03 12:21:11 -07:00
Mouse Reeve a84a744e8d Track changed fields in activity to model code 2021-08-03 08:48:15 -07:00