summaryrefslogtreecommitdiff
path: root/internal/processing
AgeCommit message (Collapse)AuthorFiles
2023-09-29[chore/bugfix] Deinterface text.Formatter, allow underscores in hashtags (#2233)Libravatar tobi3
2023-09-29[bugfix] Move follow.show_reblogs check further up to avoid showing unwanted ↵Libravatar tobi1
reblogs in home timeline (#2234)
2023-09-23[chore] deinterface the typeutils.Converter and update to use state ↵Libravatar kim65
structure (#2217) * update typeconverter to use state structure * deinterface the typeutils.TypeConverter -> typeutils.Converter * finish copying over old type converter code comments * fix cherry-pick merge issues, fix tests pointing to old typeutils interface type still
2023-09-21[feature] Implement explicit domain allows + allowlist federation mode (#2200)Libravatar tobi6
* love like winter! wohoah, wohoah * domain allow side effects * tests! logging! unallow! * document federation modes * linty linterson * test * further adventures in documentation * finish up domain block documentation (i think) * change wording a wee little bit * docs, example * consolidate shared domainPermission code * call mode once * fetch federation mode within domain blocked func * read domain perm import in streaming manner * don't use pointer to slice for domain perms * don't bother copying blocks + allows before deleting * admonish! * change wording just a scooch * update docs
2023-09-20[feature] add paging to AP following / followers endpoints (#2198)Libravatar kim1
2023-09-12[feature] add paging to account follows, followers and follow requests ↵Libravatar kim14
endpoints (#2186)
2023-09-12[feature] Allow admins to expire remote public keys; refetch expired keys on ↵Libravatar tobi3
demand (#2183)
2023-09-07[chore] much improved paging package (#2182)Libravatar kim1
2023-09-04[feature] Store admin actions in the db, prevent conflicting actions (#2167)Libravatar tobi9
2023-08-19[feature] Instance rules (#2125)Libravatar f0x523
* init instance rules database model, admin api * expose instance rules in public instance api * public /api/v1/instance/rules route * GET ruleById * createRule route * createRule auth check * updateRule * deleteRule * list rules on about page * ruleGet auth * add about page ids for anchors * process and store adding violated rules to reports * admin api models for instance rules * instance rule edit frontend * change rule inputs to textareas * database fixes after rebase (#2124) * remove unused imports * fix db migration column name * fix tests * fix more tests * fix postgres error with wrongly used Ident * add some tests, fiddle with rule model a bit, fix postgres migration * swagger docs --------- Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-08-15[chore] ensure worker contexts have request ID (#2120)Libravatar kim2
2023-08-11[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)Libravatar tobi6
2023-08-11[bugfix] Populate followReq before accessing targetaccount pointer (#2099)Libravatar tobi1
2023-08-10[chore] Add test to ensure `show_reblogs` on follow works as expected (#2093)Libravatar tobi1
2023-08-10[performance] remove last of relational queries to instead rely on caches ↵Libravatar kim2
(#2091)
2023-08-09[feature] List replies policy, refactor async workers (#2087)Libravatar tobi21
* Add/update some DB functions. * move async workers into subprocessor * rename FromFederator -> FromFediAPI * update home timeline check to include check for current status first before moving to parent status * change streamMap to pointer to mollify linter * update followtoas func signature * fix merge * remove errant debug log * don't use separate errs.Combine() check to wrap errs * wrap parts of workers functionality in sub-structs * populate report using new db funcs * embed federator (tiny bit tidier) * flesh out error msg, add continue(!) * fix other error messages to be more specific * better, nicer * give parseURI util function a bit more util * missing headers * use pointers for subprocessors
2023-08-08[bugfix] don't accept unrelated statuses (#2078)Libravatar kim1
Co-authored-by: Daenney <daenney@users.noreply.github.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-08-07[chore] Use generic pointer function (#2080)Libravatar Daenney5
This replaces the different $TypePtr functions with a generic implementation.
2023-08-07[feature] Allow full BCP 47 in language inputs (#2067)Libravatar Vyr Cossont4
* Allow full BCP 47 in language inputs Fixes #2066 * Fuse validation and normalization for languages * Remove outdated comment line * Move post language canonicalization test
2023-08-04[performance] add caching of status fave, boost of, in reply to ID lists (#2060)Libravatar kim4
2023-08-02[bugfix] Rework MultiError to wrap + unwrap errors properly (#2057)Libravatar tobi1
* rework multierror a bit * test multierror
2023-08-02[bugfix] Allow instance accounts to be shown in search results in certain ↵Libravatar tobi4
circumstances (#2053)
2023-07-31[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)Libravatar tobi3
* update go-fed * do the things * remove unused columns from tags * update to latest lingo from main * further tag shenanigans * serve stub page at tag endpoint * we did it lads * tests, oh tests, ohhh tests, oh tests (doo doo doo doo) * swagger docs * document hashtag usage + federation * instanceGet * don't bother parsing tag href * rename whereStartsWith -> whereStartsLike * remove GetOrCreateTag * dont cache status tag timelineability
2023-07-31[performance] cache follow, follow request and block ID lists (#2027)Libravatar kim2
2023-07-29[feature] Implement markers API (#1989)Libravatar Vyr Cossont4
* Implement markers API Fixes #1856 * Correct import grouping in markers files * Regenerate Swagger for markers API * Shorten names for readability * Cache markers for 6 hours * Update DB ref * Update envparsing.sh
2023-07-27[feature] Support setting private notes on accounts (#1982)Libravatar Vyr Cossont1
* Support setting private notes on accounts * Reformat comment whitespace * Add missing license headers * Use apiutil.ParseID * Rename Note model and cache to AccountNote * Update golden cache config in test/envparsing.sh * Rename gtsmodel/note.go to gtsmodel/accountnote.go * Update AccountNote uniqueness constraint name Now has same prefix as other indexes on this table. --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2023-07-25[performance] retry db queries on busy errors (#2025)Libravatar kim1
* catch SQLITE_BUSY errors, wrap bun.DB to use our own busy retrier, remove unnecessary db.Error type Signed-off-by: kim <grufwub@gmail.com> * remove dead code Signed-off-by: kim <grufwub@gmail.com> * remove more dead code, add missing error arguments Signed-off-by: kim <grufwub@gmail.com> * update sqlite to use maxOpenConns() Signed-off-by: kim <grufwub@gmail.com> * add uncommitted changes Signed-off-by: kim <grufwub@gmail.com> * use direct calls-through for the ConnIface to make sure we don't double query hook Signed-off-by: kim <grufwub@gmail.com> * expose underlying bun.DB better Signed-off-by: kim <grufwub@gmail.com> * retry on the correct busy error Signed-off-by: kim <grufwub@gmail.com> * use longer possible maxRetries for db retry-backoff Signed-off-by: kim <grufwub@gmail.com> * remove the note regarding max-open-conns only applying to postgres Signed-off-by: kim <grufwub@gmail.com> * improved code commenting Signed-off-by: kim <grufwub@gmail.com> * remove unnecessary infof call (just use info) Signed-off-by: kim <grufwub@gmail.com> * rename DBConn to WrappedDB to better follow sql package name conventions Signed-off-by: kim <grufwub@gmail.com> * update test error string checks Signed-off-by: kim <grufwub@gmail.com> * shush linter Signed-off-by: kim <grufwub@gmail.com> * update backoff logic to be more transparent Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-07-24[feature/performance] support uncaching remote emoji + scheduled cleanup ↵Libravatar kim4
functions (#1987)
2023-07-23[chore] Admin CLI + new account creation refactoring (#2008)Libravatar tobi3
* set maxPasswordLength to 72 bytes, rename validate function * refactor NewSignup * refactor admin account CLI commands * refactor oidc create user * refactor processor create * tweak password change, check old != new password
2023-07-21[bugfix] Return all accounts when list accounts limit <= 0 (#2014)v0.10.0Libravatar tobi1
2023-07-18[bugfix] more robust list timeline invalidation (#1995)v0.10.0-rc3Libravatar kim10
2023-07-12[bugfix] Update account `Update` logic (#1984)Libravatar tobi1
2023-07-10[bugfix] Tidy up rss feed serving; don't error on empty feed (#1970)Libravatar tobi2
* [bugfix] Tidy up rss feed serving; don't error on empty feed * fall back to account creation time as rss feed update time * return feed early when account has no eligible statuses
2023-07-08[bugfix] Fix delete follow req instead of follow (#1962)Libravatar tobi1
2023-07-08[bugfix] Delete mutual follow (requests) when receiving block from remote ↵Libravatar tobi1
(#1960) * [bugfix] Delete mutual follow (requests) on block * fix test
2023-07-07[bugfix] Reorder web view logic, other small fixes (#1954)Libravatar tobi4
2023-07-07[chore/bugfix] Domain block tidying up, Implement first pass of `207 ↵Libravatar tobi2
Multi-Status` (#1886) * [chore/refactor] update domain block processing * expose domain block import errors a lil better * move/remove unused query keys
2023-06-24[bugfix] Ensure `InReplyToID` set properly, update dereference ancestors ↵Libravatar tobi1
func (#1921)
2023-06-22[bugfix/chore] oauth entropy fix + media cleanup tasks rewrite (#1853)Libravatar kim5
2023-06-21[feature] Add partial text search for accounts + statuses (#1836)Libravatar tobi7
2023-06-11[bugfix] Invalidate timeline entries for status when stats change (#1879)Libravatar tobi6
2023-06-10[bugfix] Delete from list timeline on status deletion (#1878)Libravatar tobi1
2023-06-04[chore] tidy + test timelines a bit better (#1865)Libravatar tobi2
* [chore] tidy + test timelines a bit better * thanks linter
2023-06-03[chore] Update versions, fix lint errors (#1860)Libravatar tobi2
2023-05-28[chore] tidy up media manager, add calling func to errors, build-script ↵Libravatar kim13
improvements (#1835) * media manager tidy-up: de-interface and remove unused PostDataFunc Signed-off-by: kim <grufwub@gmail.com> * remove last traces of media.Manager being an interface Signed-off-by: kim <grufwub@gmail.com> * update error to provide caller, allow tuneable via build tags Signed-off-by: kim <grufwub@gmail.com> * remove kim-specific build script changes Signed-off-by: kim <grufwub@gmail.com> * fix merge conflicts Signed-off-by: kim <grufwub@gmail.com> * update build-script to support externally setting build variables Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-05-25[feature] Add List functionality (#1802)Libravatar tobi28
* start working on lists * further list work * test list db functions nicely * more work on lists * peepoopeepoo * poke * start list timeline func * we're getting there lads * couldn't be me working on stuff... could it? * hook up handlers * fiddling * weeee * woah * screaming, pissing * fix streaming being a whiny baby * lint, small test fix, swagger * tidying up, testing * fucked! by the linter * move timelines to state like a boss * add timeline start to tests using state * invalidate lists
2023-05-22[chore] update account statuses paging logic (#1814)Libravatar tobi1
2023-05-15[bugfix] Fix duplicating fields on profile edit (#1788)Libravatar tobi2
* [bugfix] Fix duplicating fields on profile edit * test non-duplicate fields
2023-05-12[feature] status refetch support (#1690)Libravatar kim13
* revamp http client to not limit requests, instead use sender worker Signed-off-by: kim <grufwub@gmail.com> * remove separate sender worker pool, spawn 2*GOMAXPROCS batch senders each time, no need for transport cache sweeping Signed-off-by: kim <grufwub@gmail.com> * improve batch senders to keep popping recipients until remote URL found Signed-off-by: kim <grufwub@gmail.com> * fix recipient looping issue Signed-off-by: kim <grufwub@gmail.com> * move request id ctx key to gtscontext, finish filling out more code comments, add basic support for not logging client IP Signed-off-by: kim <grufwub@gmail.com> * first draft of status refetching logic Signed-off-by: kim <grufwub@gmail.com> * fix testrig to use new federation alloc func signature Signed-off-by: kim <grufwub@gmail.com> * fix log format directive Signed-off-by: kim <grufwub@gmail.com> * add status fetched_at migration Signed-off-by: kim <grufwub@gmail.com> * remove unused / unchecked for error types Signed-off-by: kim <grufwub@gmail.com> * add back the used type... Signed-off-by: kim <grufwub@gmail.com> * add separate internal getStatus() function for derefThread() that doesn't recurse Signed-off-by: kim <grufwub@gmail.com> * improved mention and media attachment error handling Signed-off-by: kim <grufwub@gmail.com> * fix log and error format directives Signed-off-by: kim <grufwub@gmail.com> * update account deref to match status deref changes Signed-off-by: kim <grufwub@gmail.com> * very small code formatting change to make things clearer Signed-off-by: kim <grufwub@gmail.com> * add more code comments Signed-off-by: kim <grufwub@gmail.com> * improved code commenting Signed-off-by: kim <grufwub@gmail.com> * only check for required further derefs if needed Signed-off-by: kim <grufwub@gmail.com> * improved cache invalidation Signed-off-by: kim <grufwub@gmail.com> * tweak cache restarting to use a (very small) backoff Signed-off-by: kim <grufwub@gmail.com> * small readability changes and fixes Signed-off-by: kim <grufwub@gmail.com> * fix account sync issues Signed-off-by: kim <grufwub@gmail.com> * fix merge conflicts + update account enrichment to accept already-passed accountable Signed-off-by: kim <grufwub@gmail.com> * remove secondary function declaration Signed-off-by: kim <grufwub@gmail.com> * normalise dereferencer get status / account behaviour, fix remaining tests Signed-off-by: kim <grufwub@gmail.com> * fix remaining rebase conflicts, finish commenting code Signed-off-by: kim <grufwub@gmail.com> * appease the linter Signed-off-by: kim <grufwub@gmail.com> * add source file header Signed-off-by: kim <grufwub@gmail.com> * update to use TIMESTAMPTZ column type instead of just TIMESTAMP Signed-off-by: kim <grufwub@gmail.com> * don't pass in 'updated_at' to UpdateEmoji() Signed-off-by: kim <grufwub@gmail.com> * use new ap.Resolve{Account,Status}able() functions Signed-off-by: kim <grufwub@gmail.com> * remove the somewhat confusing rescoping of the same variable names Signed-off-by: kim <grufwub@gmail.com> * update migration file name, improved database delete error returns Signed-off-by: kim <grufwub@gmail.com> * formatting Signed-off-by: kim <grufwub@gmail.com> * improved multi-delete database functions to minimise DB calls Signed-off-by: kim <grufwub@gmail.com> * remove unused type Signed-off-by: kim <grufwub@gmail.com> * fix delete statements Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
2023-05-09[feature] Enable federation in/out of profile PropertyValue fields (#1722)Libravatar tobi11
Co-authored-by: kim <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>