summaryrefslogtreecommitdiff
path: root/internal/ap/extract.go
AgeCommit message (Collapse)AuthorFiles
2023-11-30[bugfix] return 400 Bad Request on more cases of malformed AS data (#2399)Libravatar kim1
2023-11-21[feature] Federate status language in and out (#2366)Libravatar tobi1
* [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-11[bugfix] support endless polls, and misskey's' method of inferring expiry in ↵Libravatar kim1
closed polls (#2349)
2023-11-08[feature] add support for polls + receiving federated status edits (#2330)Libravatar kim1
2023-11-04[feature] support canceling scheduled tasks, some federation API performance ↵Libravatar kim1
improvements (#2329)
2023-10-31[bugfix] Relax `Mention` parsing, allowing either href or name (#2320)Libravatar tobi1
2023-10-26[bugfix] Extract description as `summary` first, fall back to `name` (#2303)Libravatar tobi1
2023-10-04[feature] tentatively start adding polls support (#2249)Libravatar kim1
2023-10-03[chore] internal/ap: add pollable AS types, code reformatting, general ↵Libravatar kim1
niceties (#2248)
2023-07-31[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)Libravatar tobi1
* 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-06-17[chore/bugfix] Refactor `ap/extract.go` functions, return URIs more reliably ↵Libravatar tobi1
(#1897)
2023-06-13[chore] Refactor AP authentication, other small bits of tidying up (#1874)Libravatar tobi1
2023-05-09[feature] Enable federation in/out of profile PropertyValue fields (#1722)Libravatar tobi1
Co-authored-by: kim <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
2023-04-26[bugfix] Fix remaining mangled URI escaping issues in statuses + accounts ↵Libravatar tobi1
(#1712) * start fiddling with normalize + extract functions * normalize attachment name (image description) * NormalizeAccountableSummary * normalize summary + name
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney1
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-02-20[bugfix] Fix failure to look up remote profiles with duplicate emojis in ↵Libravatar Sam Lade1
some cases (#1534) * Tidy up emoji parsing on profile submission Don't bother reparsing for emoji unless one of the fields that can have emoji in it has changed. Deduplicate emoji between the display name and profile note - I'm not sure whether this was hurting anything, but better safe. * Deduplicate emoji when parsing remote accounts Some servers - Misskey at least - don't deduplicate emoji, so it's possible to get an account which has the same emoji used in both the display name and note and therefore includes that emoji twice in its metadata. When we start trying to put those into our database, we run into a uniqueness constraint and fall over. This change just deduplicates at the point of construction of an account.
2023-02-02[bugfix] Read Bookwyrm Articles more thoroughly (#1410)Libravatar tobi1
2023-01-27[feature] Federate reports to remote instance as Flag (if desired) (#1386)Libravatar tobi1
* reports federate out, we did it lxds * fix optional line start (should be optional slash)
2023-01-25[feature] Accept incoming federated Flag activity (#1382)Libravatar tobi1
* start working on handling incoming Flag activity * interim commit * federate Flag in successfully
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi1
2022-11-30[feature] Support PKCS1 "RSA PUBLIC KEY" pem block type (#1179)Libravatar Sigrid Solveig Haflínudóttir1
* ap: add support for PKCS1 "RSA PUBLIC KEY" pem block type Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> * ap: report no PEM data or unknown pem block type Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> Signed-off-by: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
2022-10-13[feature] Refetch emojis when they change on remote instances (#905)Libravatar tobi1
* select emoji using image_static_url * use updated on AP emojis * allow refetch of updated emojis * cheeky workaround for test * clean up old files for refreshed emoji * check error for originalPostData * shorten GetEmojiByStaticImageURL * delete kirby (sorry nintendo)
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-23[feature] Allow delivery to sharedInboxes where possible (#847)Libravatar tobi1
* update Activity * add instance-deliver-to-shared-inboxes setting * update activity version again * add SharedInboxURI field to accounts * serdes for endpoints/sharedInbox * deliver to sharedInbox if one is available * update tests * only assign shared inbox if shared domain * look for shared inbox if currently nil * go fmt * finger to get params.RemoteAccountID if necessary * make comments clearer * compare dns more consistently
2022-08-15[chore] Update bun / sqlite versions; update gtsmodels (#754)Libravatar tobi1
* upstep bun and sqlite versions * allow specific columns to be updated in the db * only update necessary columns for user * bit tidier * only update necessary fields of media_attachment * only update relevant instance fields * update tests * update only specific account columns * use bool pointers on gtsmodels includes attachment, status, account, user * update columns more selectively * test all default fields on new account insert * updating remaining bools on gtsmodels * initialize pointer fields when extracting AP emoji * copy bools properly * add copyBoolPtr convenience function + test it * initialize false bool ptrs a bit more neatly
2022-06-11[chore] Webfinger rework (#627)Libravatar tobi1
* move finger to dereferencer * totally break GetRemoteAccount * start reworking finger func a bit * start reworking getRemoteAccount a bit * move mention parts to namestring * rework webfingerget * use util function to extract webfinger parts * use accountDomain * rework finger again, final form * just a real nasty commit, the worst * remove refresh from account * use new ASRepToAccount signature * fix incorrect debug call * fix for new getRemoteAccount * rework GetRemoteAccount * start updating tests to remove repetition * break a lot of tests Move shared test logic into the testrig, rather than having it scattered all over the place. This allows us to just mock the transport controller once, and have all tests use it (unless they need not to for some other reason). * fix up tests to use main mock httpclient * webfinger only if necessary * cheeky linting with the lads * update mentionName regex recognize instance accounts * don't finger instance accounts * test webfinger part extraction * increase default worker count to 4 per cpu * don't repeat regex parsing * final search for discovered accountDomain * be more permissive in namestring lookup * add more extraction tests * simplify GetParseMentionFunc * skip long search if local account * fix broken test
2022-05-23[bugfix] Fix `error extracting status content: no content found` (#598)Libravatar tobi1
* don't return error if no content found in Activity * add test for content extraction * go fmt
2022-04-26[bugfix] Fix CWs not showing sometimes (#488)Libravatar tobi1
* allow summaries that are parsed as iris * test parsing a status with iri summary
2022-03-21don't error if content property is nil (#436)Libravatar tobi1
2022-01-09tests are passing, but there's still much to be doneLibravatar tsmethurst1
2021-12-20Extend license notices to 2022 (#354)Libravatar tobi1
2021-11-13move to ssb gofed fork (#298)Libravatar tobi1
2021-10-17fix mention extracting when no domain exists (usually intra-instance ↵Libravatar kim1
mentions) (#272) * fix mention extracting when no domain exists (usually when intra-instance mentions) Signed-off-by: kim <grufwub@gmail.com> * fix search logic to match new mention matching logic Signed-off-by: kim <grufwub@gmail.com> * appease the linter :p Signed-off-by: kim <grufwub@gmail.com>
2021-10-06Derive visibility fixes (#271)Libravatar tobi1
* use pub public const * don't error on no summary * move extract visibility to separate function * extract visibility test * add addressable interface
2021-09-04rework media processing a little bit (#191)Libravatar tobi1
* rework media processing a little bit * review changes
2021-08-29Mention fixup (#167)Libravatar tobi1
* rework mention creation a bit * rework mention creation a bit * tidy up status dereferencing * start adding tests for dereferencing * fixups * fix * review changes
2021-08-20Database updates (#144)Libravatar tobi1
* start moving some database stuff around * continue moving db stuff around * more fiddling * more updates * and some more * and yet more * i broke SOMETHING but what, it's a mystery * tidy up * vendor ttlcache * use ttlcache * fix up some tests * rename some stuff * little reminder * some more updates
2021-08-10Dereference remote replies (#132)Libravatar Tobi Smethurst1
* decided where to put reply dereferencing * fiddling with dereferencing threads * further adventures * tidy up some stuff * move dereferencing functionality * a bunch of refactoring * go fmt * more refactoring * bleep bloop * docs and linting * start implementing replies collection on gts side * fiddling around * allow dereferencing our replies * lint, fmt