Commit graph

271 commits

Author SHA1 Message Date
Andrew Godwin
af6ddcf8f1 Drive user timeline and RSS off a single service 2022-12-22 13:11:47 -08:00
Andrew Godwin
a058140d11 New "plain" page style for most logged out pages 2022-12-22 13:06:35 -08:00
Andrew Godwin
e066641556 Accept emoji using nameMap 2022-12-22 17:19:12 +00: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
79fd800a78 Accept objects with contentMap only 2022-12-22 05:29:49 +00:00
Andrew Godwin
02f942f1ad Add boost/like count to more timelines 2022-12-22 04:27:02 +00:00
Tyler Kennedy
7e5b5dc4e4
Various UX tweaks and front end fixes. (#230) 2022-12-22 21:28:28 +00:00
Andrew Godwin
f9b5f372ac Responsive styling fix, shorter pages
Refs #102
2022-12-22 01:06:01 +00:00
Andrew Godwin
f5f74dc150 Further search fixing 2022-12-21 21:46:09 +00:00
Andrew Godwin
45de0e09b5 Switch to preserving username case
Except on comparisons, for now. Fixes #224
2022-12-21 21:39:56 +00:00
Andrew Godwin
13ebe14cf9 Don't show deleted follows, and sort publicly 2022-12-21 20:56:52 +00:00
Gabriel Rodríguez Alberich
1349144e37
Minor design tweaks to the Follows page (#222)
* Filter outbound and inbound follows by active state
* Change pill appearance to distinguish it from buttons
* Signal destructive action when hovering unfollow buttons
* Add hover style to the top "tabs"/"filters"
* Make filters icon have the same width so selecting them doesn't change the options total width, which is mildly unnerving
2022-12-21 19:57:14 +00:00
Andrew Godwin
e2371a3cd7 Move timelines to a service class 2022-12-21 19:47:48 +00:00
Michael Manfre
ed83726247
Identity fanout (#196) 2022-12-21 17:13:39 +00:00
Michael Manfre
a7082decc8
Optimize timeline queries (#219) 2022-12-21 11:09:18 +00:00
Andrew Godwin
6039cde49e It's amazing what a little select_related can do 2022-12-20 15:35:48 +00:00
Andrew Godwin
f82b82502c Install debug toolbar in debug mode 2022-12-20 15:26:39 +00:00
Andrew Godwin
12a838eb0e Don't crash trying to fetch parents we don't have 2022-12-20 15:02:20 +00:00
Andrew Godwin
3b3285964e Fix inbound/outbound targeting 2022-12-20 14:20:11 +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
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
db3fc7c53c Fetch actors with posts when needed
Fixes #190, #205
2022-12-20 10:17:52 +00:00
Andrew Godwin
9067caf9a3 Add expanded post context
Fixes #120
2022-12-20 09:59:06 +00:00
Andrew Godwin
e28294c81a Hashtag admin simplification 2022-12-20 09:16:03 +00:00
Michael Manfre
84dbb51de7
Raw response in JSON debug (#211) 2022-12-20 08:19:00 +00:00
Andrew Godwin
f4f575d22f Type and fanout fixes 2022-12-20 07:01:30 +00:00
Andrew Godwin
6eaaa6eac4 Allow other Actor types 2022-12-20 06:52:33 +00:00
Andrew Godwin
985bb95aca Add error states, use for fanout 2022-12-20 06:23:50 +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
Andrew Godwin
48174d84a4 Don't linkify mentions inside links 2022-12-19 00:27:05 +00:00
Andrew Godwin
3544aa0c8b Don't use domain on hashtags for local disp
Fixes #200
2022-12-19 00:05:58 +00:00
Andrew Godwin
9e2092c4b2 Fix new focalpoint parsing 2022-12-18 14:16:26 -07:00
Andrew Godwin
bfe015ebd8 Don't worry about interactions on dead posts 2022-12-18 14:14:49 -07:00
Andrew Godwin
6cdcbcfab9 Remove test URL 2022-12-18 11:14:19 -07:00
Andrew Godwin
58e11ae3b6 Debug JSON view, json fixes 2022-12-18 11:00:21 -07:00
Andrew Godwin
770aa1531a Do actual ISO date parsing
Fixes #187
2022-12-18 10:45:32 -07:00
Andrew Godwin
b8dca2b71f Do not allow posts from blocked domains in
Fixes #172
2022-12-18 09:58:43 -07:00
Andrew Godwin
5d6ff57b5f Don't include broken users in reply mentions
Fixes #192
2022-12-18 09:50:29 -07:00
Andrew Godwin
bcd48368b5 Don't notify if we mention ourselves
Fixes #191
2022-12-18 09:48:18 -07:00
Andrew Godwin
90c7b615fd Move timelines to published date all around 2022-12-18 09:44:56 -07:00
Andrew Godwin
35102fbdd4 Merge timelineevent, urls and post type migration 2022-12-18 09:22:15 -07:00
Michael Manfre
a408cbaa27
Post types (#182)
Initial support for Posts of type other than 'Note'. Render special Post types with templates.
2022-12-18 09:09:25 -07:00
Tyler Kennedy
fc79551656
Increase the allowed size of URIs
Increase the allowed size of Post.object_uri and Post.url from 500 characters to a more reasonable 2048. See https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers.
2022-12-17 20:20:51 -07:00
Andrew Godwin
b6a8737d2e Some more JSON-LD namespace fixing 2022-12-17 17:48:33 -07:00
Andrew Godwin
17d75c4797 Allow for attachments with no width/height
Fixes #186
2022-12-17 15:45:54 -07:00
Andrew Godwin
d08324e159 Handle timeouts on image fetch 2022-12-17 15:00:50 -07:00
Andrew Godwin
e8d6dccbb2 Report function and admin 2022-12-17 14:45:31 -07:00
Andrew Godwin
24a4fbe1f8 Catch all possible request errors 2022-12-17 12:29:48 -07:00
Andrew Godwin
1f28361fd9 Return unreviewed emoji in API correctly 2022-12-17 12:20:00 -07:00
Andrew Godwin
5bbcc0f6c3 Add AP output to emoji admin 2022-12-17 12:07:13 -07:00
Andrew Godwin
d7ffb47fb2 Make emoji better on the wire 2022-12-16 22:20:58 -07:00
Andrew Godwin
606c628343 Fanout admin improvements 2022-12-16 21:51:16 -07:00
Andrew Godwin
cc3c3d9816 404 deleted posts 2022-12-16 21:32:08 -07:00
Andrew Godwin
a7d389020a Handle undos of missing posts 2022-12-16 20:17:19 -07:00
Andrew Godwin
727b357744 Fan out replies to the original author's followers
Fixes #64
2022-12-16 20:11:07 -07:00
Andrew Godwin
770f6728f6 Fix mastodon LD namespace
Fixes #179
2022-12-16 19:45:39 -07:00
Andrew Godwin
12567f6891 Identity admin/moderation 2022-12-16 19:42:48 -07:00
Andrew Godwin
c588567c86 Add follow times 2022-12-16 17:39:10 -07:00
Andrew Godwin
be377653fe Fix inbound/outbound links 2022-12-16 17:32:04 -07:00
Andrew Godwin
00795f119e Split Follows page into two types
This overcomes the query problem of pulling a combined list
2022-12-16 17:24:56 -07:00
Gabriel Rodríguez Alberich
fb2eea956e
Several pagination improvements (#170)
Home/Notification gets pagination, Follows becomes ListView
2022-12-16 17:06:29 -07:00
Andrew Godwin
45c6978bc3 User admin and LD schema fixes 2022-12-16 16:38:52 -07:00
Andrew Godwin
1bcdff79e7 Fix hashtag linking and API mentions of empty 2022-12-15 19:26:06 -07:00
Andrew Godwin
c0cd5a5553 Some hashtag json-ld fiddling 2022-12-15 18:58:11 -07:00
Andrew Godwin
31dc08ad0d Add hashtags to post objects 2022-12-15 17:00:00 -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
Andrew Godwin
13fd3785f2 Handle updates for already deleted posts 2022-12-15 13:47:12 -07:00
Andrew Godwin
5e912ecac5 Fix outbound emoji federation 2022-12-15 12:26:44 -07:00
Michael Manfre
af3142ac3a
Basic Emoji suppport (#157) 2022-12-15 00:50:54 -07:00
Gabriel Rodríguez Alberich
8db05bed95
Prevent n+1 queries when rendering timelines (#165)
The linkify_mentions function is traversing the post's mentions, so
better prefetch those.
2022-12-14 10:16:22 -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
8ffe4bc145 A better way of handling URIs between local/remote 2022-12-12 11:56:49 -07:00
Andrew Godwin
35a45f1c55 A few more fixes and a bad test 2022-12-12 11:56:49 -07:00
Andrew Godwin
f892c0c4ce Fix mentions of missing identities 2022-12-12 11:56:49 -07:00
Andrew Godwin
20239b5cb7 Basic post mutation 2022-12-12 11:56:49 -07:00
Andrew Godwin
fc8a21fc5c More API read coverage 2022-12-12 11:56:49 -07:00
Andrew Godwin
3e062aed36 Timelines working 2022-12-12 11:56:49 -07:00
Andrew Godwin
1017c71ba1 Working start of an OAuth flow 2022-12-12 11:56:49 -07:00
Andrew Godwin
f504e9c351 Fix form loading hyperscript config 2022-12-11 09:34:44 -07:00
TAKAHASHI Shuuji
6d473a83cc
Add the character counter next to the Post button (#152) 2022-12-11 09:25:48 -07:00
Avi Flax
9405698e3c
Two small tweaks to compose UI (#153) 2022-12-11 09:23:39 -07:00
Andrew Godwin
3595af7bd2 Media proxy, caching and tuning docs
Fixes #67
2022-12-10 12:16:08 -07:00
Andrew Godwin
9a978786d4 Skip over follows 2022-12-08 23:27:51 -07:00
Andrew Godwin
20f3919783 Add interaction states on notifications page
Fixes #129
2022-12-08 22:59:34 -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
dcf2d801b9
'View in admin' link for post popup menu (#134) 2022-12-06 16:55:35 -07:00
Michael Manfre
b8460b0acd
Only cache unauthenticated page views (#117) 2022-12-05 22:23:07 -07:00
Andrew Godwin
b0929214d5 Allow selecting notification types to see 2022-12-05 22:15:05 -07:00
Michael Manfre
64cea557be
Collapse linkify mentions (#123) 2022-12-05 21:44:26 -07:00
Andrew Godwin
5b82c76def Shorten mention names when linkified
Fixes #121
2022-12-05 20:26:21 -07:00
Andrew Godwin
9fe2e6676c Add a middleware to detect LD Accept headers 2022-12-05 20:02:35 -07:00
Michael Manfre
da9a3d853e
Fix unset parent variable when viewing top post (#119) 2022-12-05 16:07:18 -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
Andrew Godwin
9becbb24d4 Fix post tests, don't reply to self 2022-12-04 21:30:18 -07:00
Andrew Godwin
107c3d6cf8 Fetch post parents live too 2022-12-04 21:22:20 -07:00
Andrew Godwin
93ccb5dd32 Make search work with URLs 2022-12-04 21:13:33 -07:00
Andrew Godwin
28ac03c42f Fetch user in real-time for searches
Fixes #84
2022-12-04 20:31:49 -07:00
Andrew Godwin
6291fa0f5c Fix mentions in replies/capitalisation 2022-12-04 20:23:02 -07:00
Avi Flax
4493eefb76
Make max media upload size configurable 2022-12-04 18:20:50 -07:00
Andrew Godwin
c3d4d0f547 Image upload polishing and webp 2022-12-04 10:46:41 -07:00
Tyler Kennedy
6ce05296b0
Make follows a top-level activity. (#94) 2022-12-04 09:41:41 -07:00
Avi Flax
7a7907a6df
Tweaks to search UX (#92) 2022-12-03 19:47:09 -07:00
Andrew Godwin
9f3ad0be16 Don't allow file uploads bigger than 10MB 2022-12-02 04:02:38 -07:00
Andrew Godwin
6f2f28a3a7 Image attachment uploads 2022-12-01 18:47:04 -07:00
Andrew Godwin
8139ccffdb Fix hashtag extraction 2022-11-29 09:44:37 -07:00
Andrew Godwin
c72893372a Collapse notifications on the same post 2022-11-28 22:42:40 -07:00
Andrew Godwin
fb342cfb54 Fix hashtagging of HTML entities 2022-11-28 22:34:14 -07:00
Andrew Godwin
4420507f62 Show parent post on individual page 2022-11-28 22:34:03 -07:00
Andrew Godwin
0bced8fe17 A few hashtag fixups 2022-11-28 22:14:52 -07:00
Andrew Godwin
1ad9bfcb06 Add GIN index to Post.hashtags 2022-11-28 21:47:31 -07:00
Michael Manfre
fb8f2d1098
Hashtags 2022-11-28 21:41:36 -07:00
Andrew Godwin
0221ea261f Admin tweaks 2022-11-27 17:16:09 -07:00
Andrew Godwin
348c03e7da Default replies to unlisted, new users to public 2022-11-27 15:40:17 -07:00
Tyler Kennedy
68d59b399e
Set content type when serving object
Fixes #37
2022-11-27 14:43:46 -07:00
Andrew Godwin
842b458395 Change how we link individual-post view 2022-11-27 14:25:09 -07:00
Andrew Godwin
3217569df5 Link to post pages and show replies there
Fixes #60, #59
2022-11-27 12:37:52 -07:00
Andrew Godwin
03ba96ff26 Show reply threads in Home correctly 2022-11-27 12:21:16 -07:00
Andrew Godwin
8e9e3ecf69 Some cleanup around editing 2022-11-27 12:09:08 -07:00
Michael Manfre
6c7ddedd34
Post editing 2022-11-27 11:09:46 -07:00
Andrew Godwin
0f77f0ba96 Only let you delete your own posts 2022-11-27 00:55:19 -07:00
Michael Manfre
849c221aee
Local-only posting 2022-11-26 10:09:31 -07:00
Michael Manfre
d60ba9a051
Added default post visibility 2022-11-25 19:33:46 -07:00
Andrew Godwin
95bad674b5 Needed to await adding a mention 2022-11-25 18:35:43 -07:00
Andrew Godwin
1cf1f2e543 Implement user discoverability 2022-11-25 18:32:45 -07:00
Andrew Godwin
5fe5f04955 Exclude replies in most situations from timelines 2022-11-25 18:20:59 -07:00
Andrew Godwin
79002e1eaf Add initial delete UI 2022-11-24 22:31:57 -07:00
Kian-Meng Ang
df5493dd2a
Fix typos
Found via `codespell -S ./static -L keypair`
2022-11-24 21:30:21 -07:00
Andrew Godwin
786d6190f8 Delete mechanics and refactor of post fanout 2022-11-24 17:11:04 -07:00
Andrew Godwin
ec634f2ad3 Initial reply-to feature 2022-11-24 15:17:32 -07:00
Michael Manfre
96f863d5d8
Allow authenticated users to remote search/fetch by exact identity 2022-11-22 21:07:22 -07:00
Andrew Godwin
975c205d1d Show boosts and likes on other post list pages 2022-11-22 19:58:56 -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
48154fb20e Fix boosted notifications 2022-11-22 18:59:51 -07:00
Andrew Godwin
e52c7df498 Add the self-view timeline event on post
Makes it show up for you immediately
2022-11-22 18:51:01 -07:00
Andrew Godwin
b7c7c66013 Start adding pagniation to timelines 2022-11-22 09:57:42 -07:00
Andrew Godwin
63ab492439 Fix mentions at the start of posts 2022-11-21 22:17:22 -07:00
Andrew Godwin
53d9452917 Outgoing mentions mostly work (exc. cc followers) 2022-11-21 21:18:13 -07:00
Andrew Godwin
a80e0f117a Mentionify tests and some fixtures 2022-11-21 20:25:00 -07:00
Andrew Godwin
0d1e09fbcd Refactor almost all tests into /tests/ 2022-11-21 20:10:01 -07:00
Andrew Godwin
e38e176784 Don't santinize incoming post content
Helps with forwards compatibility
2022-11-21 20:00:35 -07:00
Andrew Godwin
f6132a8e21 Initial mentions-linking code 2022-11-21 19:59:27 -07:00
Andrew Godwin
97a841d1bb Move signed request onto Identity as a shortcut 2022-11-20 18:32:55 -07:00
Andrew Godwin
b4166f78bb Cascade identity deletes to posts too 2022-11-20 12:59:06 -07:00
Andrew Godwin
4b4032be6f Add Sentry error integration option 2022-11-20 11:18:55 -07:00
Michael Manfre
f8f4fa8665
Fix bug in timedeltashort and add tests 2022-11-20 11:14:49 -07:00