summaryrefslogtreecommitdiff
path: root/internal/api
AgeCommit message (Collapse)AuthorFiles
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 tobi6
2023-12-09[bugfix] Fix web media not showing as sensitive (#2433)Libravatar tobi2
* [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-11-30[bugfix] return 400 Bad Request on more cases of malformed AS data (#2399)Libravatar kim1
2023-11-29[bugfix] Correctly handle range > content-length (#2395)Libravatar Jadeiin1
2023-11-28[chore]: Bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (#2335)Libravatar dependabot[bot]2
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kim <grufwub@gmail.com>
2023-11-27[feature] Add `/api/v1/admin/debug/apurl` endpoint (#2359)Libravatar tobi4
2023-11-27[performance] http response encoding / writing improvements (#2374)Libravatar kim103
2023-11-23[chore/bugfix] Fix double gzip on prometheus endpoint (#2383)Libravatar tobi2
* [chore] Move "/metrics" into separate API module * use our own gzip middleware for prom
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 tobi2
* [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-20[bugfix] self-referencing collection pages for status replies (#2364)Libravatar kim3
2023-11-17[feature] Set/show instance language(s); show post language on frontend (#2362)Libravatar tobi2
* 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 tobi21
* [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-13[feature/performance] Wrap incoming HTTP requests in timeout handler (#2353)Libravatar tobi7
* deinterface router, start messing about with deadlines * weeeee * thanks linter (thinter) * write Connection: close when timing out requests * update wording * don't replace req * don't bother with fancy Cause functions (I'll use them one day...)
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-10[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from ↵Libravatar tobi13
strings (#2346)
2023-11-09[bugfix/docs] Poll api fixups + swagger docs (#2345)Libravatar tobi3
2023-11-08[feature] add support for polls + receiving federated status edits (#2330)Libravatar kim19
2023-10-30[bugfix] Allow blocked accounts to show in precise search (#2321)Libravatar tobi1
2023-10-30[feature] Customizable media cleaner schedule (#2304)Libravatar tobi1
2023-10-25[feature] Status thread mute/unmute functionality (#2278)Libravatar tobi4
* 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 tobi2
2023-10-23[chore] de-interface{} the federator and dereferencer structs (#2285)Libravatar kim19
* de-interface{} the federator and dereferencer structs * fix broken type signatures
2023-10-17[feature] Allow import/export/creation of domain allows via admin panel (#2264)v0.12.0-rc1Libravatar tobi1
* it's happening! * aaa * fix silly whoopsie * it's working pa! it's working ma! * model report parameters * shuffle some more stuff around * getting there * oo hoo * finish tidying up for now * aaa * fix use form submit errors * peepee poo poo * aaaaa * ffff * they see me typin', they hatin' * boop * aaa * oooo * typing typing tappa tappa * almost done typing * weee * alright * push it push it real good doo doo doo doo doo doo * thingy no worky * almost done * mutation modifers not quite right * hmm * it works * view blocks + allows nicely * it works! * typia install * the old linterino * linter plz
2023-10-04[docs] statuses-query-pinned #2250 (#2251)Libravatar 恐咖兵糖1
2023-10-04[feature] tentatively start adding polls support (#2249)Libravatar kim2
2023-10-03[chore] internal/ap: add pollable AS types, code reformatting, general ↵Libravatar kim1
niceties (#2248)
2023-09-23[chore] deinterface the typeutils.Converter and update to use state ↵Libravatar kim18
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 tobi12
* 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 kim2
2023-09-12[feature] add paging to account follows, followers and follow requests ↵Libravatar kim8
endpoints (#2186)
2023-09-12[feature] Allow admins to expire remote public keys; refetch expired keys on ↵Libravatar tobi4
demand (#2183)
2023-09-11[feature] Support Actor URIs for webfinger queries (#2187)Libravatar Daenney1
* [feature] Support Actor URIs for webfinger queries It's now possible to pass an Actor URI as the resource to query for when doing a webfinger query. The code now extracts the username and domain from the URI. The URI needs to be fully qualified, including having a scheme of http or https to be recognised as such. The acct scheme is handled as we used to, including dealing with an erroneous leading @ on the username. We retain the ability to handle resources without a scheme by parsing them again with the acct scheme if the original parse failed. This can happen due to parsing ambiguities when dealing with a string like user@domain.tld:port. * [bugfix] Remove debugging changes * [chore] Make TestExtractNamestring table-driven * [chore] Unnest Trim and Split for readability
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 tobi4
2023-08-19[feature] Instance rules (#2125)Libravatar f0x5218
* 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-17[bugfix] fix double firing bun.DB query hooks (#2124)Libravatar kim3
* improve bun.DB wrapping readability + comments, fix double-firing query hooks * fix incorrect code comment placement * fix linter issues * Update internal/db/basic.go * do as the linter commmands ... --------- Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: Daenney <daenney@users.noreply.github.com>
2023-08-11[bugfix] Fix using wrong key for clientID during oauth callback (#2101)Libravatar tobi1
2023-08-11[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)Libravatar tobi1
2023-08-10[performance] remove last of relational queries to instead rely on caches ↵Libravatar kim2
(#2091)
2023-08-07[chore] Use generic pointer function (#2080)Libravatar Daenney6
This replaces the different $TypePtr functions with a generic implementation.
2023-08-07[feature] Allow full BCP 47 in language inputs (#2067)Libravatar Vyr Cossont3
* 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-02[bugfix] Rework MultiError to wrap + unwrap errors properly (#2057)Libravatar tobi12
* rework multierror a bit * test multierror
2023-08-02[bugfix] Allow instance accounts to be shown in search results in certain ↵Libravatar tobi1
circumstances (#2053)
2023-07-31[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)Libravatar tobi18
* 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 Cossont5
* 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