Commit graph

149 commits

Author SHA1 Message Date
Andrew Godwin
a6922cb9d6 Move to a new HTML parser/stripper
This removes the use of the EOL'd Bleach, and also integrates hashtag,
mention and emoji searching into one single place.
2023-01-29 17:47:06 -07:00
Corry Haines
93c0af992b
Templatize robots.txt (#478) 2023-01-29 12:27:07 -07:00
Michael Manfre
51ae78a33c
Downgrade most fetch related errors to capture_message (#443) 2023-01-19 13:14:55 -07:00
Michael Manfre
8ff4575976
capture_exception doesn't accept 'level' arg (#441) 2023-01-18 14:05:50 -07:00
Michael Manfre
e5485b1430
Handle nodeinfo validation errors (#439) 2023-01-18 10:57:28 -07:00
Michael Manfre
cc75863b8f
Fixes #431 - Preserve href when stripping <a> tags (#436) 2023-01-17 23:41:33 -07:00
Andrew Godwin
50f8c8040d Add light theme and some more CSS variables 2023-01-16 13:05:21 -07:00
Michael Manfre
333317875b
Don't show ellipsis when URL shortening only removed scheme (#427) 2023-01-16 12:27:25 -07:00
Michael Manfre
9b6ceee490
Apply Mastodon style link text shortening (#426) 2023-01-16 11:59:46 -07:00
Corry Haines
cfe18932b8
Match sanitizing for posts to Mastodon (#422)
Creates filter for REWRITTEN_TAGS that converts them to `p` rather than ripping them out entirely, and formats `ul` as break-separated list

Both changes align sanitization to Mastodon's "strict" sanitizer at https://github.com/mastodon/mastodon/blob/main/lib/sanitize_ext/sanitize_config.rb#L73

I don't love the complexity of the Filter, but Bleach doesn't give us great options to work with. The code operates within an iterator without the useful "sibling" methods that Ruby's equivalent has. Also, Bleach runs filters _after_ sanitizing (unlike Ruby's which runs before) so we have to pass all the elements through the sanitizer, then rewrite them after the fact.
2023-01-15 22:32:04 -07:00
Andrew Godwin
9dded19172 Add admin notification for new identities 2023-01-15 14:48:17 -07:00
Andrew Godwin
e68158202e Fix signature typechecking 2023-01-11 11:00:18 -07:00
Andrew Godwin
ecec5d6c0a Implement snowflake IDs for some models.
Still needs fixes to the client API paginator.
2023-01-08 18:05:29 -07:00
Andrew Godwin
fa003e2be6 Save all animation frames if they make it through 2023-01-08 14:28:25 -07:00
Corry Haines
d8cee4097f
Modify emoji loader for cache-optimized return value (#371)
Also fixes an apparent bug in `imageify_emojis.replacer` where `include_local` was not being used correctly (previous code path never returned anything.
2023-01-07 15:19:47 -07:00
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