summaryrefslogtreecommitdiff
path: root/internal/processing
AgeCommit message (Collapse)AuthorFiles
2024-01-20[bugfix] Prevent URL + URI for same account being used as alias target (#2545)Libravatar tobi2
* [bugfix] Ensure URL and URI for same account can't both be provided as alias * test whoopsie from previous PR
2024-01-19[bugfix] Ensure domain block side effects skipped if allow in place ↵Libravatar tobi2
(blocklist mode) (#2542)
2024-01-19[performance] overhaul struct (+ result) caching library for simplicity, ↵Libravatar kim1
performance and multiple-result lookups (#2535) * rewrite cache library as codeberg.org/gruf/go-structr, implement in gotosocial * use actual go-structr release version (not just commit hash) * revert go toolchain changes (damn you go for auto changing this) * fix go mod woes * ensure %w is used in calls to errs.Appendf() * fix error checking * fix possible panic * remove unnecessary start/stop functions, move to main Cache{} struct, add note regarding which caches require start/stop * fix copy-paste artifact... :innocent: * fix all comment copy-paste artifacts * remove dropID() function, now we can just use slices.DeleteFunc() * use util.Deduplicate() instead of collate(), move collate to util * move orderByIDs() to util package and "generify" * add a util.DeleteIf() function, use this to delete entries on failed population * use slices.DeleteFunc() instead of util.DeleteIf() (i had the logic mixed up in my head somehow lol) * add note about how collate differs from deduplicate
2024-01-17[chore] update viper version (#2539)Libravatar kim1
* update viper version * removes our last uses of the slice package * fix tests
2024-01-16[feature] Account alias / move API + db models (#2518)Libravatar tobi6
* [feature] Account alias / move API + db models * go fmt * fix little cherry-pick issues * update error checking, formatting * add and use new util functions to simplify alias logic
2024-01-05[feature] Parse instance descriptors as markdown, show T&C on /about (#2481)Libravatar tobi2
* [feature] Parse instance descriptors as markdown, show T&C on /about * lint * remove unnecessary nullzero tags
2024-01-03[bugfix] fix check for closed poll to account for non-zero closed time but ↵Libravatar kim1
in the future (#2486)
2023-12-27[chore] Refactor HTML templates and CSS (#2480)Libravatar tobi1
* [chore] Refactor HTML templates and CSS * eslint * ignore "Local" * rss tests * fiddle with OG just a tiny bit * dick around with polls a bit more so SR stops saying "clickable" * remove break * oh lord * don't lazy load avatar * fix ogmeta tests * clean up some cruft * catch remaining calls to c.HTML * fix error rendering + stack overflow in tag * allow templating attributes * fix indent * set aria-hidden on status complementary content, since it's already present in the label anyway * tidy up templating calls a little * try to make styling a bit more consistent + readable * fix up some remaining CSS issues * fix up reports
2023-12-18[feature] request blocking by http headers (#2409)Libravatar kim1
2023-12-16[feature] Push status edit messages into open streams (#2418)Libravatar Sam Lade6
* push status edit messages into open streams * fix a few comments * test++ * commented out code? moi?
2023-12-15[bugfix] use a much shorter refresh limit for statuses with polls (#2453)v0.13.0Libravatar kim9
* specifically use a much shorter refresh limit for statuses with polls * allow specifying whether status must be upToDate in calls to Get(Visible)?TargetStatusBy_(), limit force refresh to 5 minute cooldown * remove the PollID check from statusUpToDate() * remove unnecessary force flag checks * remove unused field * check refresh status error * use argument name 'refresh' instead of 'upToDate' to better fit with the codebase * add statuses_poll_id_idx * remove the definitely-not copy-pasted comment i accidentally typed out in full * only synchronously refresh if the refresh flag is provided, otherwise do async * fix wrong force value being provided for async --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2023-12-10[bugfix] Narrow search scope for accounts starting with '@'; don't LOWER ↵Libravatar tobi2
SQLite text searches (#2435)
2023-12-10[bugfix] Ensure `pre` renders as expected, fix orderedCollectionPage (#2434)Libravatar tobi1
2023-12-08[bugfix] Fix wrong notification type sent for poll end (#2429)Libravatar tobi1
2023-12-01[bugfix/chore] `Announce` reliability updates (#2405)v0.13.0-rc1Libravatar tobi6
* [bugfix/chore] `Announce` updates * test update * fix tests * TestParseAnnounce * update comments * don't lock/unlock, change function signature * naming stuff * don't check domain block twice * UnwrapIfBoost * beep boop
2023-12-01[bugfix] in fedi API CreateStatus(), handle case of data-race and return ↵Libravatar kim1
early (#2403)
2023-11-30[bugfix] return 400 Bad Request on more cases of malformed AS data (#2399)Libravatar kim3
2023-11-30[bugfix] always go through status parent dereferencing on isNew, even on ↵Libravatar kim1
data-race (#2402) * no need to deref status author account, will already be deref'd during previous getStatusByAP{IRI,Model}() * don't unset the isNew flag on dereference data race * improved code comment
2023-11-27[feature] Add `/api/v1/admin/debug/apurl` endpoint (#2359)Libravatar tobi1
2023-11-27[bugfix] Add Actor to outgoing poll vote Create; other fixes (#2384)Libravatar tobi1
2023-11-21[chore/security] refactor AuthenticateFederatedRequest() to handle account ↵Libravatar kim4
deref + suspension checks (#2371) * refactor AuthenticateFederatedRequest() to handle account suspension + fetching of owner * small fixups * small changes * revert to 'IsEitherBlocked' instead of just 'IsBlocked" :grimace: * update code comment to indicate that AuthenticateFederatedRequest() will handle account + instance dereferencing
2023-11-20[bugfix] self-referencing collection pages for status replies (#2364)Libravatar kim6
2023-11-17[feature] Set/show instance language(s); show post language on frontend (#2362)Libravatar tobi3
* update go text, include text/display * [feature] Set instance langs, show post lang on frontend * go fmt * WebGet * set language for whole article, don't use FA icon * mention instance languages + other optional config vars * little tweak * put languages in config properly * warn log language parse * change some naming around * tidy up validate a bit * lint * rename LanguageTmpl in template
2023-11-14[bugfix] process account delete side effects in serial, not in parallel (#2360)Libravatar tobi7
* [bugfix] process account delete side effects in serial, not in parallel * StartWorkers / StartNoopWorkers for tests * undo testrig trace logging * log errors instead of immediately returning
2023-11-11[bugfix] support endless polls, and misskey's' method of inferring expiry in ↵Libravatar kim1
closed polls (#2349)
2023-11-10[feature] Media attachment placeholders (#2331)Libravatar tobi5
* [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup
2023-11-10[bugfix] Don't try to update suspended accounts (#2348)Libravatar tobi2
* [bugfix] Don't try to update suspended accounts * bail early if requesting account suspended
2023-11-08[bugfix] fix poll vote count responses on client and fedi API vote creation ↵Libravatar kim2
(#2343) * increment poll votes *before* enqueuing vote to client API worker * increment vote counts before federating status update after vote in local poll * improved vote count calculation during backend -> frontend model conversion
2023-11-08[feature] add support for polls + receiving federated status edits (#2330)Libravatar kim21
2023-11-04[feature] support canceling scheduled tasks, some federation API performance ↵Libravatar kim3
improvements (#2329)
2023-10-30[bugfix] Allow blocked accounts to show in precise search (#2321)Libravatar tobi5
2023-10-30[feature] Customizable media cleaner schedule (#2304)Libravatar tobi5
2023-10-25[feature] Status thread mute/unmute functionality (#2278)Libravatar tobi17
* add db models + functions for keeping track of threads * give em the old linty testy * create, remove, check mutes * swagger * testerino * test mute/unmute via api * add info log about new index creation * thread + allow muting of any remote statuses that mention a local account * IsStatusThreadMutedBy -> IsThreadMutedByAccount * use common processing functions in status processor * set = NULL * favee! * get rekt darlings, darlings get rekt * testrig please, have mercy muy liege
2023-10-23[chore] de-interface{} the federator and dereferencer structs (#2285)Libravatar kim14
* de-interface{} the federator and dereferencer structs * fix broken type signatures
2023-10-18[bugfix] add missing "local" param in public timeline link headers (#2277)v0.12.0-rc2Libravatar tobi1
2023-10-04[feature] tentatively start adding polls support (#2249)Libravatar kim7
2023-09-29[bugfix] Fix paging for empty items (#2236)Libravatar tobi4
* use minID properly for public timeline * return paged response properly even when 0 items * use gtserror * page more consistently (for now) * test * aaa
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