summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)AuthorFiles
2024-01-31[bugfix] parent status replied to status not dereferenced sometimes (#2587)Libravatar kim6
* much simplified DereferenceStatusAncestors(), also handles edge cases now * perform status acceptibility check before handling even as forward * don't further dereference ancestors if they're up to date * call enrichStatusSafely() directly to ensure we get error messages * change getStatusByURI() semantics to return error + old model on failed update, fix deref ancestor to check for staleness before refetch * perform a nil-check on the status.Local variable, in case it hasn't been set on new status attempting refresh * more consistently set returned parent status, don't check if updated * only home-timeline statuses if explicitly visible AND not explicitly invisible! * fix broken test now that status acceptibility checks happen on forwarded statuses
2024-01-29[bugfix] Fix Postgres emoji delete, emoji category change (#2570)Libravatar tobi15
* [bugfix] Fix Postgres emoji delete, emoji category change * revert trace logging * caching issue * update tests
2024-01-28[chore] Add a couple tests for updating list entries (#2580)Libravatar tobi2
2024-01-28[bugfix] Fix EmptyJSONObject/EmptyJSONArray (#2576)Libravatar Vyr Cossont1
* Fix EmptyJSONObject/EmptyJSONArray These are meant to be the bytes representing an empty object and array in JSON: `{}` and `[]`. They are actually the strings `"{}"` and `"[]"`. This causes clients expecting an object or array to not be able to parse the response. * Use json.RawMessage instead of []byte
2024-01-26[bugfix] Don't return Account or Status if new and dereferencing failed, ↵Libravatar tobi13
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-22[feature] Ratelimit + serve emoji images on separate router group (#2548)Libravatar tobi2
* [feature] Serve + rate limit emoji files separately from attachments * add a wee little warning about uploading loads of emojis
2024-01-22[bugfix] Don't return Internal Server Error when searching for URIs that ↵Libravatar tobi3
don't return AP JSON (#2550) * [bugfix] Don't return Internal Server Error when searching for URIs that don't return AP JSON * don't pass map pointer
2024-01-22[feature] Allow "charset=utf8" in incoming AP POST requests (#2564)Libravatar tobi2
* [feature] Allow "charset=utf8" in incoming AP POST requests * changed my mind * document POSTing to a GtS inbox * correct link
2024-01-21[bugfix] fix array type for also_known_as_uris (#2553)Libravatar tobi1
2024-01-21[chore] Downgrade OTEL libraries to 1.20 (#2546)Libravatar Daenney1
For some reason httpconv seems to have disappeared from 1.21, which results in a 1.21 runtime with 1.20 semconv/httpconv which seems to break some things. For now, this rolls the OTEL dependencies back to 1.20 which should fix the observability issues. We'll need to take a look at how to upgrade safely and correctly in the future. Relates to #2503.
2024-01-20[bugfix] Prevent URL + URI for same account being used as alias target (#2545)Libravatar tobi3
* [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[chore] Harden up boolptr logic on Accounts, warn if not set (#2544)Libravatar tobi6
2024-01-19[performance] overhaul struct (+ result) caching library for simplicity, ↵Libravatar kim49
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-18[chore] chore rationalise http return codes for activitypub handlers (#2540)Libravatar kim5
* some small code fixups and changes * add check in ResolveIncomingActivity for transient activity types (i.e. activity ID is nil) * update test to handle new transient behaviour
2024-01-17[chore] update viper version (#2539)Libravatar kim6
* update viper version * removes our last uses of the slice package * fix tests
2024-01-16[bugfix] Better Postgres search case insensitivity (#2526)Libravatar tobi3
* [bugfix] Better Postgres search case insensitivity * use ilike for postgres
2024-01-16[feature] Account alias / move API + db models (#2518)Libravatar tobi21
* [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-15[chore] Move to codeberg's exif-terminator (#2536)Libravatar tobi1
2024-01-15[bugfix] Replace named unique constraint on header filter header with ↵Libravatar tobi2
generic unique directive (#2525) * [bugfix] Replace named unique constraint on header filter header with generic unique directive * add migration retry * the old fixie uppie * fix constraint name * my goodness
2024-01-13[chore/docs] Replace specific year range of copyright notice (#2520)Libravatar tobi4
2024-01-09[bugfix] fix higher-level explicit domain rules causing issues with ↵Libravatar kim3
lower-level domain blocking (#2513) * fix the sort direction of domain cache child nodes ... * add more domain cache test cases * add specific test for this bug to database domain test suite (thanks for writing this @tsmethurst!) * remove unused field (this was a previous attempt at a fix) * remove debugging println statements :innocent:
2024-01-09[bugfix] misc dereferencer fixes (#2475)Libravatar kim2
* only perform status-up-to-date checks if no statusable has been provided * copy over the same style of freshness checking from status deref -> accounts * change some var names * check for empty account domain
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-09[feature] Log pubKeyID for http-signed requests (#2501)Libravatar tobi1
2024-01-05[feature] Allow webp emoji uploads / derefs (#2484)Libravatar tobi5
2024-01-05[feature] Parse instance descriptors as markdown, show T&C on /about (#2481)Libravatar tobi9
* [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)
2024-01-03[bugfix] increases sleep time before check in throttle test, to give more ↵Libravatar kim1
leeway (#2482)
2023-12-27[chore] Refactor HTML templates and CSS (#2480)Libravatar tobi29
* [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[bugfix] :innocent: (#2476)Libravatar kim1
2023-12-18[feature] request blocking by http headers (#2409)Libravatar kim31
2023-12-16fix poll total vote double count (#2464)Libravatar Sam Lade1
2023-12-16[feature] Push status edit messages into open streams (#2418)Libravatar Sam Lade7
* push status edit messages into open streams * fix a few comments * test++ * commented out code? moi?
2023-12-16[feature] Run ANALYZE after migrations on SQLite (#2428)Libravatar Daenney1
* [feature] Run ANALYZE after migrations on SQLite This ensures that at the end of migrations, we run ANALYZE if we're using SQLite. This should be relatively quick and guarantees that the table and index statistics have been updated. This helps to ensure the query planner makes better choices when it comes to picking which indexes are used when running queries. * [chore] use ExecContext Uses ExecContext so we pass the context through, this is helpful for anyone running with tracing enabled
2023-12-16[performance] simpler throttling logic (#2407)Libravatar kim4
* reduce complexity of throttling logic to use 1 queue and an atomic int * use atomic add instead of CAS, add throttling test
2023-12-15[bugfix] use a much shorter refresh limit for statuses with polls (#2453)v0.13.0Libravatar kim17
* 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-12[bugfix] Let templates deref pointers, as a treat (#2448)v0.13.0-rc2Libravatar tobi1
2023-12-12[bugfix] poll vote count fixes (#2444)Libravatar kim4
* 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-11[bugfix] ensure the 'Closing' flag doesn't get cached (#2443)Libravatar kim1
2023-12-10[bugfix] Narrow search scope for accounts starting with '@'; don't LOWER ↵Libravatar tobi4
SQLite text searches (#2435)
2023-12-10[bugfix] Ensure `pre` renders as expected, fix orderedCollectionPage (#2434)Libravatar tobi15
2023-12-09[bugfix] Fix web media not showing as sensitive (#2433)Libravatar tobi5
* [bugfix] Fix web media not showing as sensitive * test * go fmt
2023-12-08[bugfix] Fix wrong notification type sent for poll end (#2429)Libravatar tobi1
2023-12-08[chore] Run ANALYZE for SQLite after latest migrations (#2427)Libravatar tobi1
2023-12-08[bug] Fix an import statement in the gen template (#2426)Libravatar Daenney1
The package was renamed from langs to language.
2023-12-05[chore/frontend] Refactor status templates slightly, put polls behind CWs if ↵Libravatar tobi2
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 tobi15
* [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 kim28