Commit Graph

184 Commits

Author SHA1 Message Date
Michael Manfre 69b0430819
Add custom_head config to inject HTML in to page <head> (#350) 2023-01-04 16:42:03 -07:00
Andrew Godwin a7a292a84c Pagination styling and "max users" signup limit 2023-01-03 01:32:00 -07:00
Andrew Godwin bb0ee1b152 Purge failing inbox messages too 2023-01-01 13:10:54 -07:00
Tyler Kennedy b19f05859d
Apply image orientation metadata before resizing. (#345) 2023-01-01 11:40:56 -07:00
Andrew Godwin 63fcd0b665 Fix data integrity schema 2022-12-31 11:56:50 -07:00
Andrew Godwin 4956c7cd7a Add more schemas into our local store 2022-12-31 10:46:38 -07:00
NaphalSec 05adbace24
email templates (#328) 2022-12-30 16:03:11 -07:00
Andrew Godwin 011c51b3c4 Implement progressive thread parent fetching 2022-12-30 11:48:42 -07:00
Andrew Godwin ea6f272047 Infinite scroll, and footer in sidebar if exists 2022-12-29 11:33:41 -07:00
Corry Haines 165d84abbf
Fixes developed from mypy_django script (#312) 2022-12-29 10:35:14 -07:00
Tyler Kennedy cc7824394b
Fixes for the Toot! client (#248) (#275)
* Various Toot! fixes
* Use a fallback 1x1 pixel image for missing headers, same as Mastodon. The header and header_static are _not_ optional nor nullable according to the spec.
* Try removing some fields which probably shouldn't be set.
* Pagination with next/prev.
2022-12-29 10:31:32 -07:00
Andrew Godwin a2f0634cb2 Include URI in post error
Fixes #307
2022-12-28 12:06:32 -07:00
Andrew Godwin 6137149f55 Improve cache busting proxy URLs with file exts
Fixes #287.
2022-12-28 11:57:54 -07:00
Corry Haines 296780d5cc
Use cache-busting URLs for proxied files (#294)
Migrates (in a backwards-compatible way) from `/proxy/identity_image/271/` to `/proxy/identity_image/271/f5d8e72f2b/`.
dently).
2022-12-28 11:39:40 -07:00
Andrew Godwin 1fc5740696 Add funkwhale namespace 2022-12-27 19:47:17 -07:00
Michael Manfre c6c3914cc7
Include Identity metadata fields in ActivityPub messages (#295) 2022-12-27 17:42:30 -07:00
Michael Manfre ca40a0d150
Set User-Agent and Accept for outbound requests (#293) 2022-12-27 16:50:39 -07:00
Andrew Godwin 44dc7a2ce4 Remove extra newlines in post content
Fixes #282
2022-12-27 11:53:44 -07:00
Corry Haines b53504fe64
Basic OpenGraph support (#267)
Creates an OpenGraph template include in base.html including the basic tags expected on all pages.

Then allows any page to add additional expected tags via `context`.

Currently, profiles and posts are enriched to show complete opengraph metadata, and render correctly in Discord.

Note: This does not show posts in Slack like Twitter/Mastodon do. I believe this is due to Slack preferring oembed when present, which is a mastodon API endpoint we may need to create at some point.
2022-12-26 10:39:33 -07:00
Andrew Godwin d32a686eb1 Persist CWs in replies, expand linked at once
Fixes #268
2022-12-26 10:03:13 -07:00
Michael Manfre 50c07f491e
Guard Post mentions processing from unfetched Identities (#272) 2022-12-25 14:37:31 -07:00
Michael Manfre d2766860c5
Views that return fixed content only generate the content once (#271) 2022-12-25 14:26:15 -07:00
Michael Manfre 8ab0e97a86
Some servers send object as dict for PostInteraction and Follow (#261)
* Some servers send object as dict for PostInteraction and Follow

* Add core.ld.get_str_or_id helper
2022-12-24 21:24:46 -07:00
Michael Manfre ab398758a9
Fixed mention linking with mixed case usernames (#265) 2022-12-24 21:04:25 -07:00
Tyler Kennedy 801c807a2b
Simple user stylesheet support. (#258) 2022-12-24 07:28:39 -07:00
Michael Manfre d88db5efbf
BunnyCDN doesn't return content-type (#251) 2022-12-23 22:17:43 -07:00
Michael Manfre aca77314d1
Fixes #239 - Add option to hide Boost and Like counts (#247) 2022-12-23 22:16:26 -07:00
Andrew Godwin 699b6fc29e "Remove posts from front page" option 2022-12-22 14:16:08 -07:00
Andrew Godwin a058140d11 New "plain" page style for most logged out pages 2022-12-22 13:06:35 -08:00
Andrew Godwin 025fd5cf07 Emoji refactor
Emojis are now prefetched from the post, and if not, looked up
individually by shortcode, to prevent loading hundreds.
2022-12-22 16:55:31 +00:00
Andrew Godwin 9c376395db Invites overhaul
No email tie, added uses and expires, now works by URL.
2022-12-22 07:03:21 +00:00
Andrew Godwin ca3dc82a62 Don't linkify hashtags in usernames and metadata
Fixes #228
2022-12-22 01:10:56 +00:00
Andrew Godwin bf5a46df38 Provide some stuff we know of for Mastodon schema
Should fix GoToSocial pulls. Refs #223.
2022-12-21 18:23:52 +00:00
Andrew Godwin f82b82502c Install debug toolbar in debug mode 2022-12-20 15:26:39 +00:00
Andrew Godwin 51d34eda9c Significantly better hashtag link parsing
Fixes #203
2022-12-20 13:55:14 +00:00
Andrew Godwin 4635874c12 Relax accept header for gup.pe 2022-12-20 13:21:50 +00:00
Andrew Godwin 78d2283458 Move linkifying to all http-prefixed links 2022-12-20 13:21:50 +00:00
Andrew Godwin 4ad4f468a4 Refactor HTML rendering into one place
Also suppress using external <a> tags for now, until we can separate
them from hashtags properly.
2022-12-20 11:39:45 +00:00
Andrew Godwin ee669ff568 Don't make images larger on upload! 2022-12-20 06:39:37 +00:00
Andrew Godwin c3a60bbf13 Remove identity avatar fetching 2022-12-19 20:55:27 +00:00
Andrew Godwin 3de188e406 Fix Accept header and supply actor outbox
Should help with Mitra among others. Refs #207.
2022-12-19 02:47:35 +00:00
Tyler Kennedy cfa97b9740
Mitra Fixes (#207)
Don't send a list when populating Accept header. This seems to work fine on Mastodon and friends, and fixes a bug with the Mitra server until resolved upstream.
2022-12-19 11:21:04 +00:00
Andrew Godwin 5e343d2129 Tweak to predictable image namer 2022-12-18 23:47:49 +00:00
Tyler Kennedy b5895e4d28
Stop saving infinite files. (#208)
Use a consistent name for Identity.icon as a quick fix to stop flooding object storage.
2022-12-19 10:53:13 +00:00
Andrew Godwin 5ba9ed6428 Allow signing content-length header 2022-12-18 16:12:57 -07:00
Andrew Godwin 770aa1531a Do actual ISO date parsing
Fixes #187
2022-12-18 10:45:32 -07:00
Andrew Godwin b6a8737d2e Some more JSON-LD namespace fixing 2022-12-17 17:48:33 -07:00
Michael Manfre ea99f65c26
Icon and image for Identity could be a list 2022-12-17 15:42:29 -07:00
Andrew Godwin 24b5d08f9b Update all main pages to no-store 2022-12-17 15:35:22 -07:00
Andrew Godwin 4d71da7ae1 Allow for remote policy pages 2022-12-17 15:30:51 -07:00
Andrew Godwin 256ebe56d5 Don't download files with no content-length 2022-12-17 12:16:37 -07:00
Andrew Godwin 62f2b867b9 Fix serving of system actor
Fixes #183
2022-12-17 12:00:47 -07:00
Andrew Godwin f262f582cb Ooh, ooh, ignore server errors too 2022-12-16 20:14:44 -07:00
Andrew Godwin 108afaf6ce We don't care about 404 errors quite as much 2022-12-16 20:14:02 -07:00
Andrew Godwin e5b76c120e Fetch emoji for user profiles 2022-12-16 20:04:28 -07:00
Andrew Godwin 4a28e1708e Make the collectstatic hack slightly better 2022-12-16 19:51:19 -07:00
Andrew Godwin 45c6978bc3 User admin and LD schema fixes 2022-12-16 16:38:52 -07:00
Andrew Godwin c0cd5a5553 Some hashtag json-ld fiddling 2022-12-15 18:58:11 -07:00
Andrew Godwin 9ad9bdd936 Implement post rate limits, move to signed cookies
Also improve the test harness a little
Fixes #112
2022-12-15 15:55:33 -07:00
TAKAHASHI Shuuji 61fbda0ebf
Set the correct `Content-Type` header for static WebP images (#171) 2022-12-15 10:31:25 -07:00
Michael Manfre af3142ac3a
Basic Emoji suppport (#157) 2022-12-15 00:50:54 -07:00
Andrew Godwin 69f1b3168a Improve cacheability 2022-12-15 00:43:39 -07:00
Andrew Godwin 16005e14ef Make GCS backend handle webp right, and use gs://
Fixes #164
2022-12-14 21:21:18 -07:00
Gabriel Rodríguez Alberich d1ce056288
Show follows and following counts on profile page
And let their visibility be configured
2022-12-14 10:15:46 -07:00
Tyler Kennedy 0d8b7db272
Set the content type and disposition of webp files uploaded to S3 2022-12-13 23:26:19 -07:00
Andrew Godwin 5bc9ff39ac Fix static file URLs 2022-12-12 11:56:49 -07:00
Andrew Godwin 8ffe4bc145 A better way of handling URIs between local/remote 2022-12-12 11:56:49 -07:00
Andrew Godwin 20239b5cb7 Basic post mutation 2022-12-12 11:56:49 -07:00
Michael Manfre a576c5b5ed
Improve djadmin filtering and search (#149) 2022-12-08 10:29:51 -07:00
Michael Manfre 39a40e4dae
Set a Takahe User-Agent header for signed requests (#142) 2022-12-06 21:59:05 -07:00
Michael Manfre c87ad8116f
settings.SETUP.SENTRY_CAPTURE_MESSAGES (#133) 2022-12-06 16:54:45 -07:00
Michael Manfre e2b234d9ed
Setting to enable Sentry capture_messages (#128) 2022-12-06 09:50:42 -07:00
Michael Manfre b8460b0acd
Only cache unauthenticated page views (#117) 2022-12-05 22:23:07 -07:00
Andrew Godwin 9fe2e6676c Add a middleware to detect LD Accept headers 2022-12-05 20:02:35 -07:00
Andrew Godwin a31f676b46 Policy pages and signup tests.
Fixes #113
2022-12-05 19:24:46 -07:00
Michael Manfre 238268eb31
Add pylibmc and pymemcache to requirements and make timeout not lazy (#116) 2022-12-05 14:48:02 -07:00
Paolo Melchiorre 22e25ac454
Add django-upgrade to pre-commit (#114) 2022-12-05 14:44:50 -07:00
Michael Manfre d6eb16a398
Added caching and initial settings 2022-12-05 10:55:30 -07:00
Paolo Melchiorre a9bb4a7122
Add pyupgrade with --py310-plus in pre-commit (#103) 2022-12-05 10:38:37 -07:00
Michael Manfre 3f8045f412
[WIP] Sentry improvements (#108)
Stator clears scope during the main loop to behave more like
transactions. Transaction names are set.

Sentry tags:
* 'takahe.version'
* 'takahe.app' values 'web' or 'stator'

Added settings:
* TAKAHE_SENTRY_SAMPLE_RATE
* TAKAHE_SENTRY_TRACES_SAMPLE_RATE
2022-12-04 18:08:23 -07:00
Andrew Godwin c3d4d0f547 Image upload polishing and webp 2022-12-04 10:46:41 -07:00
Michael Manfre 61c1058d67
Add TAKAHE_DEFAULT_TIMEOUT with default of 5.0 (#99) 2022-12-04 09:32:25 -07:00
Andrew Godwin 864b730164 Accept dates with milliseconds in them 2022-12-04 07:31:22 -07:00
Andrew Godwin b3df5e763c Switch to secrets module for upload names 2022-12-03 14:07:30 -07:00
Andrew Godwin 6f2f28a3a7 Image attachment uploads 2022-12-01 18:47:04 -07:00
Michael Manfre fb8f2d1098
Hashtags 2022-11-28 21:41:36 -07:00
Andrew Godwin 3b079526a2 User fetching and inbox message cleaning 2022-11-27 17:05:31 -07:00
Andrew Godwin 348c03e7da Default replies to unlisted, new users to public 2022-11-27 15:40:17 -07:00
Andrew Godwin 8e9e3ecf69 Some cleanup around editing 2022-11-27 12:09:08 -07:00
Tyler Kennedy c758858392
Simplified settings
Migrated settings to typed pydantic settings
2022-11-26 10:04:04 -07:00
Michael Manfre d60ba9a051
Added default post visibility 2022-11-25 19:33:46 -07:00
Andrew Godwin 1cf1f2e543 Implement user discoverability 2022-11-25 18:32:45 -07:00
Michael Manfre 9014d53399
StatorRunner will refresh Config.system on each schedule_interval 2022-11-22 21:06:21 -07:00
Michael Manfre cdfff32f9a
Content warning name customisation
Allows the name of Content Warning to be customized (e.g. to "Content Summary").

Fixes #28.
2022-11-22 19:52:40 -07:00
Andrew Godwin 9c424d9bb6 Add manual HTMX refresh of timelines
Refs #33
2022-11-22 19:21:01 -07:00
Andrew Godwin 53d9452917 Outgoing mentions mostly work (exc. cc followers) 2022-11-21 21:18:13 -07:00
Andrew Godwin 0d1e09fbcd Refactor almost all tests into /tests/ 2022-11-21 20:10:01 -07:00
Andrew Godwin c4be52357b Make test directories into modules 2022-11-20 23:26:53 -07:00
Andrew Godwin 0b5a3e5323 Don't catch GET errors 2022-11-20 18:50:45 -07:00
Andrew Godwin 6a8fe5cb4b Remove pyOpenSSL dependency
(I figured out what padding to use with cryptography)
2022-11-20 18:42:39 -07:00