summaryrefslogtreecommitdiff
path: root/internal/processing
AgeCommit message (Collapse)AuthorFiles
2024-03-12[feature] Process incoming `Move` activity (#2724)Libravatar tobi3
* [feature] Process incoming account Move activity * fix targetAcct typo * put move origin account on fMsg * shift more move functionality back to the worker fn * simplify error logic
2024-03-06[feature] Filters v1 (#2594)Libravatar Vyr Cossont8
* Implement client-side v1 filters * Exclude linter false positives * Update test/envparsing.sh * Fix minor Swagger, style, and Bun usage issues * Regenerate Swagger * De-generify filter keywords * Remove updating filter statuses This is an operation that the Mastodon v2 filter API doesn't actually have, because filter statuses, unlike keywords, don't have options: the only info they contain is the status ID to be filtered. * Add a test for filter statuses specifically * De-generify filter statuses * Inline FilterEntry * Use vertical style for Bun operations consistently * Add comment on Filter DB interface * Remove GoLand linter control comments Our existing linters should catch these, or they don't matter very much * Reduce memory ratio for filters
2024-03-04[bugfix] check remote status permissibility (#2703)Libravatar kim1
* add more stringent checks for remote status permissibility * add check for inreplyto of a remote status being a boost * do not permit inReplyTo boost wrapper statuses * change comment wording * fix calls to NewFederator() * add code comments for NotPermitted() and SetNotPermitted() * improve comment * check that existing != nil before attempting delete * ensure replying account isn't suspended * use a debug log instead of info. check for boost using ID * shorten log string length. make info level * add note that replying to boost wrapper status shouldn't be able to happen anyways * update to use onFail() function
2024-02-29[bugfix] unwrap boosts when checking in-reply-to status (#2702)Libravatar kim1
* add stronger checks on status being replied to * update error code test is expecting
2024-02-27[feature] Add experimental `instance-federation-spam-filter` option (#2685)Libravatar tobi17
* [chore] Move `visibility` to `filter/visibility` * [feature] Add experimental instance-federation-spam-filter option
2024-02-20[bugfix] fix possible mutex lockup during streaming code (#2633)Libravatar kim12
* rewrite Stream{} to use much less mutex locking, update related code * use new context for the stream context * ensure stream gets closed on return of writeTo / readFrom WSConn() * ensure stream write timeout gets cancelled * remove embedded context type from Stream{}, reformat log messages for consistency * use c.Request.Context() for context passed into Stream().Open() * only return 1 boolean, fix tests to expect multiple stream types in messages * changes to ping logic * further improved ping logic * don't export unused function types, update message sending to only include relevant stream type * ensure stream gets closed :facepalm: * update to error log on failed json marshal (instead of panic) * inverse websocket read error checking to _ignore_ expected close errors
2024-02-19[bugfix] Ensure local statuses always get a threadID so they can be muted ↵Libravatar tobi2
(#2665) * [chore/bugfix] Ensure threadID always set on local statuses * test
2024-02-19[bugfix] Refactor parse mention, fix local mention bug (#2657)Libravatar tobi6
* [bugfix] Refactor parse mention, fix local mention bug * originAccount -> originAcct
2024-02-09use pointer for freshness window (#2614)Libravatar tobi11
2024-02-01stop paged endpoints returning null for empty items (#2597)Libravatar kim2
2024-01-31Improve context descendant sorting (#2579)Libravatar Vyr Cossont2
* Improve context descendant sorting Topologically sort replies, then move self-replies to top of list * Unify descendant sort passes * Correct test package name * Preallocate maps
2024-01-29[bugfix] Fix Postgres emoji delete, emoji category change (#2570)Libravatar tobi4
* [bugfix] Fix Postgres emoji delete, emoji category change * revert trace logging * caching issue * update tests
2024-01-26[bugfix] Don't return Account or Status if new and dereferencing failed, ↵Libravatar tobi1
other small fixes (#2563) * tidy up account, status, webfingering logic a wee bit * go fmt * invert published check * alter resp initialization * get Published from account in typeutils * don't instantiate error for no darn good reason * shadow err * don't repeat error codes in wrapped errors * don't wrap error unnecessarily
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