summaryrefslogtreecommitdiff
path: root/internal/typeutils
AgeCommit message (Collapse)AuthorFiles
2024-04-18[bugfix] Fix incorrect field name for status source, add helpful message (#2854)Libravatar tobi1
* [bugfix] Fix incorrect field name for status source, add helpful message * swagger * yyammm
2024-04-17[feature] Status source endpoint (#2848)Libravatar tobi1
* [feature] statusSource endpoint * finish up
2024-04-17[bugfix] Fix minor API issue w/ boosted statuses (#2846)Libravatar tobi2
2024-04-16[feature/performance] Store account stats in separate table (#2831)Libravatar tobi1
* [feature/performance] Store account stats in separate table, get stats from remote * test account stats * add some missing increment / decrement calls * change stats function signatures * rejig logging a bit * use lock when updating stats
2024-04-11[feature] New user sign-up via web page (#2796)Libravatar tobi2
* [feature] User sign-up form and admin notifs * add chosen + filtered languages to migration * remove stray comment * chosen languages schmosen schmanguages * proper error on local account missing
2024-04-02[chore] Try to parse public key as both Actor + bare key (#2710)Libravatar tobi1
* [chore] Try to parse public key as both Actor + bare key * fix weird test fail
2024-04-02[feature] Option to hide followers/following (#2788)Libravatar tobi2
2024-03-25[feature] User-selectable preset CSS themes for accounts (#2777)Libravatar tobi1
* [feature] User-selectable preset themes * docs, more theme stuff * lint, tests * fix css name * correct some little issues * add another theme * fix poll background * okay last theme i swear * make retrieval of apimodel themes more conventional * preallocate stylesheet slices
2024-03-22[chore] Move local account settings to separate db table (#2770)Libravatar tobi2
* [chore] Move local account settings to separate database model * don't use separate settings_id
2024-03-06[feature] Filters v1 (#2594)Libravatar Vyr Cossont1
* 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-02-27[feature] Add experimental `instance-federation-spam-filter` option (#2685)Libravatar tobi2
* [chore] Move `visibility` to `filter/visibility` * [feature] Add experimental instance-federation-spam-filter option
2024-02-23[bugfix] 2643 bug search for account url doesnt always work when redirected ↵Libravatar kim1
(#2673) * update activity library so dereferencer returns full response and checks *final* link to allow for redirects * temporarily add bodged fixed library * remove unused code * update getAccountFeatured() to use dereferenceCollectionPage() * make sure to release map * perform a 2nd decode to ensure reader is empty after primary decode * add comment explaining choice of using Decode() instead of Unmarshal() * update embedded activity library to latest matching https://github.com/superseriousbusiness/activity/pull/21 * add checks to look for changed URI and re-check database if redirected * update max iteration count to 512, add checks during dereferenceAncestors() for indirect URLs * remove doubled-up code * fix use of status instead of current * use URIs for checking equality for security * use the latest known URI for boost_of_uri in case original was an indirect * add dereferenceCollection() function for dereferenceAccountFeatured() * pull in latest github.com/superseriousbusiness/activity version (and remove the bodge!!) * fix typo in code comments * update decodeType() to accept a readcloser and handle body closing * switch to checking using BoostOfID and add note why not using BoostOfURI * ensure InReplyTo gets unset when deleting status parent in case currently stubbed * add tests for Collection and CollectionPage iterators
2024-02-20[feature] Add `requested_by` to relationship model (#2672)Libravatar tobi2
* [feature] Add `requested_by` to relationship model * whoops, missed some tests
2024-02-19[bugfix] Use ptr for instance stats entries to avoid skipping 0 values (#2666)Libravatar tobi1
* [bugfix] Use ptr for instance stats entries to avoid skipping 0 values * comment explaining why stats values are pointers
2024-02-06[feature] serdes for moved/also_known_as (#2600)Libravatar tobi4
* [feature] serdes for moved/also_known_as * document `alsoKnownAs` and `movedTo` properties * only implicitly populate AKA uris from DB for local accounts * don't let remotes store more than 20 AKA uris to avoid shenanigans
2024-01-29[bugfix] Fix Postgres emoji delete, emoji category change (#2570)Libravatar tobi1
* [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 tobi3
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 tobi1
* [bugfix] Ensure URL and URI for same account can't both be provided as alias * test whoopsie from previous PR
2024-01-19[chore] Harden up boolptr logic on Accounts, warn if not set (#2544)Libravatar tobi3
2024-01-19[performance] overhaul struct (+ result) caching library for simplicity, ↵Libravatar kim3
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-16[feature] Account alias / move API + db models (#2518)Libravatar tobi2
* [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-09[bugfix] Outdent placeholder from `<aside>` when returning unknown media ↵Libravatar tobi2
attachments (#2485) * [bugfix] Outdent placeholder from `<aside>` * visually separate placeholder note from body * fix test
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
2023-12-27[chore] Refactor HTML templates and CSS (#2480)Libravatar tobi3
* [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-16fix poll total vote double count (#2464)Libravatar Sam Lade1
2023-12-12[bugfix] poll vote count fixes (#2444)Libravatar kim1
* don't drop all vote counts if hideCounts is set, refactors poll option extraction slightly * omit voters_count when not set * make voters_count a ptr to ensure it is omit unless definitely needed * handle case of expires_at, voters_count and option.votes_count being nilable * faster isNil check * remove omitempty tags since mastodon API marks things as nullable but still sets them in outgoing json
2023-12-10[bugfix] Ensure `pre` renders as expected, fix orderedCollectionPage (#2434)Libravatar tobi1
2023-12-09[bugfix] Fix web media not showing as sensitive (#2433)Libravatar tobi3
* [bugfix] Fix web media not showing as sensitive * test * go fmt
2023-12-05[chore/frontend] Refactor status templates slightly, put polls behind CWs if ↵Libravatar tobi1
present (#2419) * [chore/frontend] Reorder templates, allow polls to be inside content warnings * show when multiple-choice
2023-12-01[bugfix/chore] `Announce` reliability updates (#2405)v0.13.0-rc1Libravatar tobi5
* [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-11-30[bugfix] return 400 Bad Request on more cases of malformed AS data (#2399)Libravatar kim5
2023-11-27[bugfix] Add Actor to outgoing poll vote Create; other fixes (#2384)Libravatar tobi4
2023-11-22[bugfix/chore] id poll options properly (#2379)Libravatar tobi1
* aria-labels for polls, id poll options properly * my bad, aria labels are for interactive elements
2023-11-22[feature] Poll web view (#2377)Libravatar tobi1
* [feature] Render polls nicely on the web view * use figure for poll, other small tweaks * reverse share + count (lines up better) * poll options list entries * fix up some remaining things
2023-11-21[feature] Federate status language in and out (#2366)Libravatar tobi7
* [feature] Federate status language in + out * go fmt * tests, little fix * improve comments * unnest a bit * avoid unnecessary nil check * use more descriptive variable for contentMap * prefer instance languages when selecting from contentMap * update docs to reflect lang selection * rename rdfLangString -> rdfLangs * update comments to mention Pollable * iter through slice instead of map
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 tobi1
* [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 kim3
closed polls (#2349)
2023-11-10[feature] Media attachment placeholders (#2331)Libravatar tobi4
* [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup
2023-11-09[bugfix/docs] Poll api fixups + swagger docs (#2345)Libravatar tobi1
2023-11-08[bugfix] fix poll vote count responses on client and fedi API vote creation ↵Libravatar kim1
(#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 kim7
2023-10-30[bugfix] Allow blocked accounts to show in precise search (#2321)Libravatar tobi2
2023-10-25[feature] Status thread mute/unmute functionality (#2278)Libravatar tobi1
* 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-24[bugfix] serialize instance terms via API (#2293)Libravatar tobi1
2023-10-04[feature] tentatively start adding polls support (#2249)Libravatar kim4
2023-09-23[chore] deinterface the typeutils.Converter and update to use state ↵Libravatar kim10
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 tobi2
* 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-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>