summaryrefslogtreecommitdiff
path: root/internal/api/model
AgeCommit message (Collapse)AuthorFiles
2023-01-11[feature] Add local user and post count to nodeinfo responses (#1325)Libravatar Sleep1
* Add local user and post count to nodeinfo responses This fixes #1307 (at least partially). The nodeinfo endpoint should now return the total users on an instance, along with their post count. * Update NodeInfoUsers docstring and swagger yaml file
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi38
2022-12-15[bugfix] Use null for empty api status `language` (#1268)Libravatar tobi1
* [bugfix] Use null for empty api status `language` * update swagger docs
2022-11-24[feature] `PATCH /api/v1/admin/custom_emojis/{id}` endpoint (#1061)Libravatar tobi1
* start adding admin emoji PATCH stuff * updating works OK, now how about copying * allow emojis to be copied * update swagger docs * update admin processer to use non-interface storage driver * remove shortcode updating for local emojis * go fmt Co-authored-by: f0x52 <f0x@cthu.lu>
2022-11-15[feature] Serialize local account role via API, and show it via web view (#1045)Libravatar tobi1
* [feature] Add 'role' field to api serialization of local accounts * [chore] Add a bit of license text while I'm here * [frogend] render account role on same line as username in web view of profile * style tweaking on role badges, general profile header layout * profile stats wrapping * don't render standard 'user' role on web view Co-authored-by: f0x <f0x@cthu.lu>
2022-11-14[feature] Allow newly uploaded emojis to be placed in categories (#939)Libravatar tobi2
* [feature] Add emoji categories GET Serialize emojis in appropriate categories; make it possible to get categories via the admin API * [feature] Create (or use existing) category for new emoji uploads * fix lint issue * update misleading line in swagger docs
2022-11-13[bugfix] Fix login on Mastodon iOS app for users with no statuses (#1042)Libravatar David Baker1
* Fix login on Mastodon iOS app for users with no statuses Mastodon for iOS can't cope with an empty string for a date and expect a JSON `null` instead. Fixes https://github.com/superseriousbusiness/gotosocial/issues/1010 * Fix expected values in tests to match
2022-11-08[feature] Make instance thumbnail configurable via admin panel (#973)Libravatar tobi1
* [feature] Make instance thumbnail configurable via admin panel * log db errors in InstanceToAPIInstance * only update instance in db if necessary * start adding tests * finish test
2022-11-03[bugfix] Wrap media in read closer (#941)Libravatar tobi1
* use readcloser for content.Content * call media postdata function no matter what * return a readcloser from data func * tidy of logic of readertostore * fix whoopsie
2022-10-17[docs] Use correct form for status submit (#915)Libravatar tobi1
2022-10-12[feature] Add `/api/v1/admin/custom_emojis` endpoint (#902)Libravatar tobi1
* add admin emojis get path + model + docs * stub admin emojis get processor function * add id + disabled fields to admin emoji * add emoji -> api admin emoji converter * tidy up a bit * add GetEmojis function * finish up get emojis function * order by shortcodedomain * ASC * tidy up + explain * update to allow paging * make admin emojis pageable * fix mixed case paging * normalize emoji queries a bit better * test emoji get paging * make limit optional * fix incorrect path in media cleanup tests * i have bad coder syndrome * don't trimspace * rename -> GetUseableEmojis * wrap emoji query in subquery avoid selecting more than we need * fix a bit of sillyness teehee * fix subquery postgres woes
2022-10-10[chore] Make paging logic more generic (#901)Libravatar tobi1
* make paging logic more generic not just for timelines! * linty linterson
2022-10-08[feature] Add opt-in RSS feed for account's latest Public posts (#897)Libravatar tobi1
* start adding rss functionality * add gorilla/feeds dependency * first bash at building rss feed still needs work, this is an interim commit * tidy up a bit * add publicOnly option to GetAccountLastPosted * implement rss endpoint * fix test * add initial user docs for rss * update rss logo * docs update * add rssFeed to frontend * feed -> feed.rss * enableRSS * increase rss logo size a lil bit * add rss toggle * move emojify to text package * fiddle with rss feed formatting * add Text field to test statuses * move status to rss item to typeconverter * update bun schema for enablerss * simplify 304 checking * assume account not rss * update tests * update swagger docs * allow more characters in title, trim nicer * update last posted to be more consistent
2022-10-06[feature] Add emoji image size to instance response (#892)Libravatar tobi1
2022-09-28[chore] update dependencies, bump to Go 1.19.1 (#826)Libravatar kim1
* update dependencies, bump Go version to 1.19 * bump test image Go version * update golangci-lint * update gotosocial-drone-build * sign * linting, go fmt * update swagger docs * update swagger docs * whitespace * update contributing.md * fuckin whoopsie doopsie * linterino, linteroni * fix followrequest test not starting processor * fix other api/client tests not starting processor * fix remaining tests where processor not started * bump go-runners version * don't check last-webfingered-at, processor may have updated this * update swagger command * update bun to latest version * fix embed to work the same as before with new bun Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2022-09-12[feature] Allow users to set custom css for their profiles + threads (#808)Libravatar tobi2
* add custom css account property + db func to fetch * allow account to get/set custom css * serve custom css for an account * go fmt * use monospace for customcss, add link * add custom css to account cache * fix broken field * add custom css docs to user guide * add `accounts-allow-custom-css` config flag * add allow custom css to /api/v1/instance response * only show/set custom css if allowed to do so * only set/serve custom account css if enabled * update swagger docs * chain promise * make bool a bit clearer * use cache for GetAccountCustomCSSByUsername
2022-09-08[bugfix] Fix preposterous characters reserved per URL amount (#809)Libravatar tobi1
* clarify docs * tidy up consts, set reserved chars much lower * update tests
2022-09-02[bugfix] Fix status fields `in_reply_to_id` and `in_reply_to_account_id` not ↵Libravatar tobi1
being nullable (#798) * make reply status fields nullable pointers * update tests
2022-08-31[feature] Add support for the exclude_types[] parameter on the notifications ↵Libravatar Blackle Morisanchetto1
endpoint (#784) * Add support for the exclude_types[] parameter on the notifications endpoint * Add swagger docs to notifications
2022-08-06[feature] Let accounts set default status format, and use this when ↵Libravatar tobi3
processing new statuses (#739) * add post_format to acct & use it when making post * update swagger docs * add status_format updating to frontend * fix up tests * post_format => status_format * add status_format to account validation
2022-07-28[feature] add 'state' oauth2 param to /oauth/authorize (#730)Libravatar tobi1
2022-07-22[bugfix] Fix Toot CLI media attachments not working properly (#726)v0.3.8Libravatar tobi1
2022-07-22[bugfix] Make `/api/v2/media` more compatible with masto API (#724)Libravatar tobi1
* update docs * make api version into a path param * update tests * workaround to unset URL if using v2 of api * make some fields into pointers
2022-07-13[feature] Add back/next buttons to profiles for paging through statuses (#708)Libravatar tobi1
* add GetAccountWebStatuses to db * add WebStatusesGet func to processor * don't add limit to next/prev links if 0 * take query params for next/prev statuses * add separate next + prev links for convenience * show 'nothing here' message if no statuses exist * add back / next links to profiles * allow paging down only * go fmt ./... * 'recent public toots' -> 'latest public toots'
2022-07-05[bugfix] Fix incorrect domain showing in profiles (#693)Libravatar tobi1
* use instance account_domain in profile * add instance account_domain field
2022-07-03[feature] S3 support (#674)Libravatar Dominik Süß1
* feat: vendor minio client * feat: introduce storage package with s3 support * feat: serve s3 files directly this saves a lot of bandwith as the files are fetched from the object store directly * fix: use explicit local storage in tests * feat: integrate s3 storage with the main server * fix: add s3 config to cli tests * docs: explicitly set values in example config also adds license header to the storage package * fix: use better http status code on s3 redirect HTTP 302 Found is the best fit, as it signifies that the resource requested was found but not under its presumed URL 307/TemporaryRedirect would mean that this resource is usually located here, not in this case 303/SeeOther indicates that the redirection does not link to the requested resource but to another page * refactor: use context in storage driver interface
2022-06-26[feature] add configuration to `/api/v1/instance` response (#670)Libravatar tobi1
* add configuration object to api instance model * regenerate swagger docs * add func to return all supported mimes for media * add instance configuration to api serialization * fix json tags * update instance endpoint tests * fix typeutils tests * final regen of swagger docs * omitempty instance configuration
2022-06-23[feature] Implement `/api/v1/instance/peers` endpoint (#660)Libravatar tobi1
* add missing license headers * start adding instance peers get * rename domainblock.go * embed domain in domainblock so it can be reused * update swagger docs * add test instances to db * update tests * add/update instancepeersget * update domain model * add getinstancepeers to db * instance-expose-peers, instance-expose-suspended * add auth checks for both current filters * attach endpoint to router * include public comment * obfuscate domain if required * go mod tidy * update swagger docs * remove unnecessary comment * return 'flat' peerlist if no query params provided
2022-06-08[feature] Add paging via `Link` header for notifications and account ↵Libravatar tobi2
statuses (#629) * test link headers * page get account statuses properly * page get notifications * add util func for packaging timeline responses * return timelined stuff from accountstatusesget * rename timeline response * use new convenience function * go fmt
2022-05-28[chore] Mastodon api fixups (#617)Libravatar tobi2
* don't omitempty on description * don't omitempty on any fields * add ms to timestamp format * don't omitempty on text_url * rearrange attachment fields a bit * just give URL again as attachment text url * update tests * fix accidental replace
2022-05-15[feature] Media cleanup endpoint (#560)Libravatar Sashanoraa1
Adds an admin endpoint to trigger a remote media cleanup. Fixed #348 Signed-off-by: Sashanoraa <sasha@noraa.gay>
2022-03-19[feature] Admin account actions (#432)Libravatar tobi1
* add accountAction to the admin API * model admin account action * add admin account action to the processor * add migration for new AdminAccountActions table * fix accounts admin path * Update swagger docs
2022-03-15[feature] Federate local account deletion (#431)Libravatar tobi1
* add account delete to API * model account delete request * add AccountDeleteLocal * federate local account deletes * add DeleteLocal * update transport (controller) to allow shortcuts * delete logic + testing * update swagger docs * more tests + fixes
2022-02-19[feature] Stream files via reader (#404)Libravatar tobi1
* serve files via reader rather than byte slice * close readcloser when we're done with it * cast reader to readcloser
2022-02-05[feature] Rework timeline code to make it useful for more than just statuses ↵Libravatar tobi1
(#373) * add preparable and timelineable interfaces * initialize timeline manager within the processor * generic renaming * move status-specific timeline logic into the processor * refactor timeline to make it useful for more than statuses
2021-12-20Extend license notices to 2022 (#354)Libravatar tobi37
2021-12-11Add `Accept` header negotiation to relevant API endpoints (#337)Libravatar tobi1
* start centralizing negotiation logic for API * swagger document nodeinfo endpoint * go fmt * document negotiate function * use content negotiation * tidy up negotiation logic * negotiate content throughout client api * swagger * remove attachment on Content * add accept header to test requests
2021-10-14User password change (#280)Libravatar tobi1
* start passwordChangeHandler * add user scope * add user module / api path * add password change request * make comment clearer * add user to processor * required true * add processor call to handler * don't pass tc or channel * change password func + tests * add some first docs about password management * update swagger docs * add api tests * go fmt * test fixes
2021-10-04Refactor/tidy (#261)Libravatar tobi17
* tidy up streaming * cut down code duplication * test get followers/following * test streaming processor * fix some test models * add TimeMustParse * fix uri / url typo * make trace logging less verbose * make logging more consistent * disable quote on logging * remove context.Background * remove many extraneous mastodon references * regenerate swagger * don't log query on no rows result * log latency first for easier reading
2021-09-11kim is a reply guy (#208)Libravatar tobi1
* bun debug * bun trace logging hooks * more tests * fix up some stuffffff * drop the frontend cache until a proper fix is made * go fmt
2021-08-02Frodo swaggins (#126)Libravatar Tobi Smethurst12
* more swagger fun * document a whole bunch more stuff * more swagger yayyyyyyy * progress + go fmt
2021-07-31more swagger docs + other changes (#125)Libravatar Tobi Smethurst1
* more swagger docs + other changes * go fmt
2021-07-31Swagger (#124)Libravatar Tobi Smethurst14
* start experimenting with swagger documentation * further adventures in swagger * do a few more api paths * account paths documented * go fmt * fix up some models * bit o lintin'
2021-07-26Markdown Statuses (#116)Libravatar Tobi Smethurst1
* parse markdown statuses if desired * add some preliminary docs for writing posts
2021-07-11Block/unblock (#96)Libravatar Tobi Smethurst1
* remote + local block logic, incl. federation * improve blocking stuff * fiddle with display of blocked profiles * go fmt
2021-07-08fix up some of the instance patching stuff (#85)Libravatar Tobi Smethurst1
2021-07-08Auth flow fixes (#82)Libravatar Tobi Smethurst1
* preliminary fixes to broken auth flow * fix some auth/cookie weirdness * fmt
2021-07-06Blocklist import (#77)Libravatar Tobi Smethurst1
* first steps on importing blocklists * unblock domains properly
2021-07-05Domain block (#76)Libravatar Tobi Smethurst1
* start work on admin domain blocking * move stuff around + further work on domain blocks * move + restructure processor * prep work for deleting account * tidy * go fmt * formatting * domain blocking more work * check domain blocks way earlier on * progress on delete account * delete more stuff when an account is gone * and more... * domain blocky block block * get individual domain block, delete a block
2021-06-24nodeinfo compliance (#61)Libravatar Tobi Smethurst2