Commit graph

1367 commits

Author SHA1 Message Date
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
fr33domlover
0de98a9cdd Implement sharer ticket JSON view, including discussion, followers, deps etc. 2020-02-10 14:10:01 +00:00
fr33domlover
00e0f7c14f DB: Switch RemoteMessage to use RemoteObject 2020-02-10 14:07:00 +00:00
fr33domlover
c03dacdb11 In getTicketR, if author is local, make sure a TicketUnderProject exists 2020-02-08 15:42:55 +00:00
fr33domlover
32173fe0c0 Add tickets-under-sharer route, just plain JSON view 2020-02-08 15:24:36 +00:00
fr33domlover
5e9dd3555d DB: Add and populate TicketUnderProject table
A row in this table will be required for local-project-local-author tickets
hosted under the project, and non-existence of a row will be required for such
tickets hosted by the author. So I'll need to CAREFULLY update all the ticket
route handler code and all the ticket related AP code. The latter includes C2S
and S2S for tickets, ticket deps, ticket discussion... everything that is under
tickets.
2020-02-08 11:49:30 +00:00
fr33domlover
7612b4e01e DB: Switch RemoteDiscussion to use RemoteObject instead of instance+ident 2020-02-08 10:55:19 +00:00
fr33domlover
fb9e2dd4dd DB: In TAL and TAR, rename 'offer' to 'open'
That's because with the Create flow added, the activity that reports a ticket
can be either Create or Offer, maybe later Announce too.

The old TAL unique name mentioned in the migration has what may look like a
typo, "Locale" instead of "Local". That's because I made a typo in migration
115, and now needed to specify the typoed name I used then. I verified in dev
DB and on dev.angeley.es DB that the typo is reflected in the PostgreSQL
database side and fixed by the new migrations.
2020-02-08 09:35:35 +00:00
fr33domlover
6fa0a9cb46 Fix bug in DB query in getTicketsR 2020-02-08 08:55:28 +00:00
fr33domlover
6e2445a31f DB: Remove unnecessary fkey from TicketAuthorRemote to Ticket
Since it points to TicketProjectLocal which in turn points to Ticket.
2020-02-07 23:05:42 +00:00
fr33domlover
5b57039447 DB: Point from TicketAuthorRemote to TicketProjectLocal 2020-02-07 19:42:02 +00:00
fr33domlover
ea7d806233 DB: Remove 'project' and 'accept' from Ticket, use TicketProjectLocal instead 2020-02-06 17:25:09 +00:00
fr33domlover
7809512117 DB: Add TicketProjectLocal table, pointing to Ticket but not in use yet 2020-02-06 04:18:19 +00:00
fr33domlover
813869755a DB: Remove foreign key from TicketAuthorLocal to Ticket, not needed anymore
Since TicketAuthorLocal now points to LocalTicket, which in turn points to
Ticket.
2020-02-06 03:41:16 +00:00
fr33domlover
fd704e231f DB: Add foreign key from TicketAuthorLocal to LocalTicket
Right now it's in addition to the Ticket one. The next patch will remove the
Ticket old, so TicketAuthorLocal will point only to the LocalTicket.
2020-02-06 03:17:00 +00:00
fr33domlover
443ff6daa1 Switch ticket routes to use the KeyHashid of LocalTicket instead of Ticket 2020-02-06 00:52:15 +00:00
fr33domlover
cd5180a1d5 DB: Remove did and fsid from Ticket, get them from LocalTicket
Everywhere Ticket is found, a matching LocalTicket is now expected to be found
too. Ticket doesn't point at LocalTicket because there will be remote cached
tickets too. Also, ticket URLs are going to switch the khid from Ticket to
LocalTicket (much like it's already the case for MessageR).
2020-02-05 14:09:12 +00:00