Commit graph

933 commits

Author SHA1 Message Date
fr33domlover
06a051d2e5 Support addressing, delivery and forwarding for sharer-patches and repo-patches 2020-05-27 10:38:28 +00:00
fr33domlover
d9c00cba1f Add repo-hosted patch routes and GET handlers 2020-05-26 14:51:11 +00:00
fr33domlover
e29233a59f Rename RepoPatchR to RepoCommitR, we'll use the old name for merge requests 2020-05-26 08:54:21 +00:00
fr33domlover
ad8c0ce8b4 Return sorted PatchId list from the get*Patch functions 2020-05-26 08:41:02 +00:00
fr33domlover
e68a659221 Support forwarding activities from repo actors 2020-05-25 13:36:34 +00:00
fr33domlover
17e59af1c4 AP: In getSharerPatchR, provide the list of patch versions, latest first 2020-05-25 12:39:25 +00:00
fr33domlover
c63479470e Add patch version route and GET handler, serving a specific patch file 2020-05-25 09:40:48 +00:00
fr33domlover
55c87b8a54 AP: Recognize "CryptographicKey" as a type of http sig keys
The examples in the security vocabulary's spec use "Key" but the JSON-LD
context doesn't define that term. From now on, just in case, recognizing both
"Key" and "CryptographicKey" as indication that the object is a key.

zPlus, thanks for finding this bug!
2020-05-25 09:37:15 +00:00
fr33domlover
417fcd3e94 S2S: If sharer inbox handler fails, return and log the error message 2020-05-24 13:53:31 +00:00
fr33domlover
d56a7411fc Refactor sharer-ticket and sharer-patch GET handler code to reuse similar parts 2020-05-24 13:31:58 +00:00
fr33domlover
90a1014ad1 Update package description in vervis.cabal, we're already federating! Mostly :P 2020-05-24 09:17:57 +00:00
fr33domlover
02c42029d2 Add GET routes and handlers for sharer-hosted patches 2020-05-24 09:17:49 +00:00
fr33domlover
bb6785de75 DB: Generalize TicketProjectLocal into TicketContextLocal
This is the first step preparing for patches and merge requests.

The work-item aspect of MRs will reuse the Ticket related tables, except MRs
will live under repos. So, the context of tickets will no longer be just
projects, but will also be repos.

So, TicketProjectLocal turns into TicketContextLocal, and there are 2 new
tables that refer to it: TicketProjectLocal and TicketRepoLocal. Tickets will
have the former, MRs will have the latter.
2020-05-18 10:28:43 +00:00
fr33domlover
77e576ccb2 Startup: Sort the repo-tree-from-filesystem, it's not sorted by default 2020-05-14 12:33:51 +00:00
fr33domlover
2063c7313b Startup: If repo dir check fails, print both versions of repo tree 2020-05-14 12:11:31 +00:00
fr33domlover
cac4edc8eb getProjectTicketsR: In AS2, list remote tickets too 2020-05-14 11:13:04 +00:00
fr33domlover
d29ba23bfb In getProjectTicket, return TUP alongside TAL to prove it exists 2020-05-14 09:09:57 +00:00
fr33domlover
036c60171b In getSharerTicket, support remote project 2020-05-14 08:59:34 +00:00
fr33domlover
003adcbf7b Comment out more uses of ticket team collection 2020-05-14 08:58:37 +00:00
fr33domlover
a5348245f6 Comment out some usage of ticket team collection for addressing
Removed its usage in pseudo-client when publishing a comment, and removed it
from inbox forwarding when handling a remote comment.

Very possibly, the ticket team collection will be entirely removed. For now
leaving it there as-is. Just not using it for addressing in activities.
2020-05-13 14:00:38 +00:00
fr33domlover
a548dc8c5b S2S: sharerCreateNoteF: If ctx is sharer-ticket of another user, store to inbox 2020-05-13 13:49:22 +00:00
fr33domlover
f296dc173c C2S: In followC, return friendly message if already following the target object 2020-05-13 13:29:39 +00:00
fr33domlover
43cd1a95f3 S2S: sharerCreateNoteF caches note and does inbox fwd if sharer is ticket owner 2020-05-13 13:06:28 +00:00
fr33domlover
c91908941b S2S: sharerCreateNoteF & projectCreateNoteF can handle sharer-hosted tickets 2020-05-11 18:59:29 +00:00
fr33domlover
edaa3c49b2 C2S: Rewrite createNoteC based on createTicketC 2020-05-01 17:48:01 +00:00
fr33domlover
23056b3b3c DB: Attach a RemoteDiscussion to each RemoteTicket, for caching comments 2020-04-14 18:24:19 +00:00
fr33domlover
6c8b9664a2 When HTTP-fetching actors, remember their 'followers' as a LocalURI
The implementation felt quite weird, had to add an extra field to Fetched and
to VerifKeyDetail. Should probably figure out the whole mess in that code, have
something clean there. Easily add fields. Easily and safely re-fetch an actor
or key.
2020-04-11 14:58:38 +00:00
fr33domlover
7dc0ba2bf1 Fix error message for HTTP inbox forwarding 2020-04-11 14:03:54 +00:00
fr33domlover
04fc94cedb S2S: Write Create/Ticket project inbox handler: list ticket & do inbox fwding 2020-04-11 13:57:43 +00:00
fr33domlover
40a5b336a4 S2S: In Undo handler for sharer inbox, support unfollowing sharer tickets 2020-04-10 10:47:43 +00:00
fr33domlover
e406b08f44 S2S: In Follow handler for sharer inbox, support following of sharer tickets 2020-04-10 10:34:22 +00:00
fr33domlover
f4ab99f7bb C2S: In Follow handler, support following sharer-hosted tickets 2020-04-09 20:04:21 +00:00
fr33domlover
90bac5c34e Support sharer-hosted tickets in AP local dispatch and delivery 2020-04-09 17:39:36 +00:00
fr33domlover
ef4a8f4015 Write S2S Create/Ticket handler for sharer inbox 2020-04-09 12:21:17 +00:00
fr33domlover
f18c15f038 Rename the TicketR routes to ProjectTicketR for clarity
Now it's much clearer when looking at the code, that these routes are about
project-hosted tickets, and it's easier to see where the author-hosted
equivalents are missing.
2020-04-09 07:36:01 +00:00
fr33domlover
4a362632be Update S2S Accept handler to handle Accept on a Create/Ticket 2020-04-08 17:02:04 +00:00
fr33domlover
318f182245 Add OAuth2 subsite 2020-03-28 14:28:24 +00:00
fr33domlover
ac477ab739 Add OAuth2 tables to database, and run their migrations 2020-03-28 14:18:00 +00:00
fr33domlover
da4b818761 List stack.yaml.lock in _boring 2020-03-28 14:16:22 +00:00
fr33domlover
8f3ac50963 Verify TUP existence (when relevant) in all project-hosted ticket routes 2020-02-24 15:36:43 +00:00
fr33domlover
bf4a0e4c95 getTicketsR: Deduce ticket URL correctly for HTML output too 2020-02-23 15:41:08 +00:00
fr33domlover
ca0c7124c1 In C2S Offer{Ticket} on local project, insert a TicketUnderProject record 2020-02-23 15:38:22 +00:00
fr33domlover
f6903364f4 getTicketsR: Deduce ticket URLs correctly for JSON output 2020-02-23 13:22:32 +00:00
fr33domlover
a00c45a444 Implement C2S Create{Ticket}, available in PublishR and in postTicketsR
IMPORTANT: Since a lot of ticket code still doesn't use TicketUnderProject,
creating tickets now appears to be failing. Usage of this patch as is, is at
your own risk ^_^ the next patches will update the ticket handlers to fix this
problem.
2020-02-22 19:45:27 +00:00
fr33domlover
e0300ba0fa Write recipient filtering utility function 2020-02-19 10:59:38 +00:00
fr33domlover
a53fbcf1c0 Vervis.ActivityPub: Implement general-purpose full local delivery
Delivery of an activity into local inboxes is being done using custom local
functions. Each C2S or S2S handler has its own specific variant for this.

As part of the ongoing refactoring and evolution of the federation code, I
implemented a general-purpose local delivery function: It takes a
LocalRecipientSet and simply delivers to everyone, no handler-specific
assumptions or limitations.

To limit the recipient set according to handler specific rules, just
filter/adapt/edit it before passing to the delivery function.

The function isn't exported yet, but the existing 'deliverLocal' that delivers
only to actors and to author's followers is now implemented via the new
general-purpose function. I hope that's a step towards doing all the local
delivery using this one function, simplifying the complicated federation
code.
2020-02-18 13:34:34 +00:00
fr33domlover
adc107bb4c Web.ActivityPub: Add createTarget field
I'll use this for C2S to allow client to state who the tracker actor is. It's
still possible to do without it, by HTTP GETing the ticket's context and
checking whether we got an actor, or a non-actor with ticketsTrackedBy. Tbh I'm
adding createTarget simply because it's easier for coding, no need for a custom
variant of actor fetching :P
2020-02-18 13:26:28 +00:00
fr33domlover
257a811a8b Remove some unused imports from Vervis.Foundation 2020-02-18 13:25:26 +00:00
fr33domlover
1a650a783f Web.ActivityPub: Move ticketContext from TicketLocal to Ticket
This allows the context to be specified even when replies/followers/deps/etc.
aren't. This is needed for Create-ing a Ticket. Also, it allows a ticket's
context to be on a different host than where it's hosted, which is also needed
for the Create flow.
2020-02-11 14:14:52 +00:00
fr33domlover
6d25d7ec2c Web.ActivityPub: Allow Create object to be a Ticket 2020-02-10 14:51:32 +00:00