24 Commits

Author SHA1 Message Date
Alessio
9c0f9504f6 "ConvertToAPIUser() now returns an error indicating a "not-found" response, which propagates through "GetUser" API calls 2024-09-15 17:59:25 -07:00
Alessio
2d35c37e17 Simply ErrNotInDatabase implementation 2024-09-15 17:47:51 -07:00
Alessio
e2ca9a975a Remove scraper singleton pattern entirely 2024-08-19 17:27:54 -07:00
Alessio
08e5a726a8 Remove most uses of the singleton pattern in 'scraper' package 2024-08-19 16:45:32 -07:00
Alessio
5d0fd63591 When returning HTTP errors, send toasts if request is HTMX 2024-08-19 14:43:28 -07:00
Alessio
24129c4852 REFACTOR: reduce technical debt, particularly that caused by singleton pattern in pkg/scraper
- ensure all scraper functions have a `api.XYZ` version and a package-level convenience function
	- isolate `the_api` to top-level convenience functions, in preparation for removal
- move a bunch of scraper functions around to be nearby their related functions
- new ErrLoginRequired
- remove obsolete APIv1 stuff (Feed, TweetDetail)
- rename scraper function GetUserFeedGraphqlFor => GetUserFeed
- fix go.mod Go version incorrectly claiming it's compatible with Go 1.16 (should be Go 1.17)
2024-08-09 19:48:50 -07:00
Alessio
4d6407492a REFACTOR: split Messages handler into functions; add 'is_htmx' helper function 2024-05-04 15:14:51 -07:00
b6aa6d1a4f Add pinned-tweet quoted tweet info if needed 2024-03-26 20:09:08 -07:00
6e283d9ef4 BUGFIX: fix user feed breaking for users without a pinned tweet 2024-03-23 11:32:57 -07:00
41e525d223 Show pinned tweets in the web UI 2024-03-18 21:30:01 -07:00
8d61aec316 REFACTOR: split Follows into its own template instead of piggybacking on Lists 2024-02-25 16:48:54 -08:00
60ac688dbc Add refreshing for user followers/followees 2023-12-31 18:12:38 -06:00
17c9ab77ea Make Followers/Followees pages show the user header at the top
- also make the followees/followers count indicators in a user header link to their respective pages
2023-12-31 16:32:43 -06:00
24364a26b0 REFACTOR: rework the rendering helpers
- rendering helpers moved to their own file (separate from response helpers)
- create a unified render helper instead of "buffered_render_basic_X" and "buffered_render_tweet_X"
	- this helper takes 2 data objects: one with global data (tweet trove, logged in user, etc) and one page-specific
	- this lets us remove the disgusting interface type
- modify the User List template to use UserIDs indexing into a global data object instead of a list of Users
2023-12-31 15:56:12 -06:00
52172e4e81 Fix lint errors 2023-12-26 23:18:34 -06:00
3117a1364c Add /user/followers and /user/followees pages 2023-12-26 23:16:51 -06:00
fee47205ec Move content downloading to the background when scraping 2023-11-26 22:13:47 -08:00
903483e305 Add function to send DMs 2023-11-26 21:25:04 -08:00
e5597ceac0 BUGFIX: user is missing when loading their user profile, try to scrape them first 2023-11-26 20:43:38 -08:00
694a8e0bc5 Change "scrape" from a URL param to a query param
- create generic "refresh" button for User Feed that refreshes whichever tab you're on
- refactor TweetDetail view into multiple pieces for easier maintenance
- on "Already liked this tweet" error, save the Like instead of discarding it
2023-11-05 15:27:40 -04:00
72df452401 Add "with replies", "without replies", "media" and "likes" tab to User Feed
- Also add UI option to scrape a user's Likes from their user profile
2023-10-13 17:47:13 -03:00
14b9143f76 Compound db queries now fetch whether the tweet is liked by the current logged-in user 2023-09-04 13:11:58 -03:00
8aca7d4ebe Add manual re-scrape for user feeds and quote-tweets stat on tweets 2023-08-27 22:55:40 -03:00
addcf0ea52 Break the HTTP handlers into separate files for maintainability 2023-08-19 22:54:44 -03:00