Commit graph

1173 commits

Author SHA1 Message Date
fr33domlover
072039f5d8 On "See JSON" pages, display a link back to "regular HTML" version of the page 2019-07-23 18:17:15 +00:00
fr33domlover
655a2ebe18 Provide AP Collection representations for ticket deps/rdeps pages 2019-07-23 18:15:51 +00:00
fr33domlover
8fc5c80dd6 New Network.FedURI with separate URI modes for dev and for fediverse
FedURIs, until now, have been requiring HTTPS, and no port number, and DNS
internet domain names. This works just fine on the forge fediverse, but it
makes local dev builds much less useful.

This patch introduces URI types that have a type tag specifying one of 2 modes:

- `Dev`: Works with URIs like `http://localhost:3000/s/fr33`
- `Fed`: Works with URIs like `https://dev.community/s/fr33`

This should allow even to run multiple federating instances for development,
without needing TLS or reverse proxies or editing the hosts files or anything
like that.
2019-07-23 13:59:48 +00:00
fr33domlover
84765e2b94 Represent a ticket dep using a dedicated TicketDependency AP type 2019-07-11 22:18:30 +00:00
fr33domlover
65edc77747 Specify deps and rdeps in Ticket as URIs of Collections 2019-07-11 15:53:55 +00:00
fr33domlover
81a05a950f Implement getTicketDepR, not used anywhere else yet
This patch also disables the ability to specify deps when creating a ticket,
because those deps won't be in the ticket object anymore. Instead of coding a
workaround and getting complications later, I just disabled that thing. It
wasn't really being used by anyone anyway.
2019-07-11 15:14:16 +00:00
fr33domlover
828e015c54 Rename TicketDepR to TicketDepOldR; we're going to use TicketDepR in a new way 2019-07-08 15:54:41 +00:00
fr33domlover
d2d51cb45a FEDERATION.md: Add example of Accept{Offer{Ticket}} activity 2019-06-30 17:54:26 +00:00
fr33domlover
d2e64d2920 Fix outbox item pretty display, it was highlighted but not pretty-encoded 2019-06-30 16:53:53 +00:00
fr33domlover
84d5375319 In inbox and notifications views, add missing space between words 2019-06-30 15:20:40 +00:00
fr33domlover
deedc961c5 If highlight backend not set for pretty JSON, assume Skylighting
Highlighter2 doesn't work for JSON anyway (not sure why yet).
2019-06-30 14:38:23 +00:00
fr33domlover
31d7e9eac7 Display times and link to activity in inbox, outbox and notifications 2019-06-30 14:04:28 +00:00
fr33domlover
dc631a98c5 Fix typo in Create Note summary text formatting 2019-06-30 11:20:43 +00:00
fr33domlover
a09585f074 Specify noteSource when inserting C2S ticket comment 2019-06-30 02:52:40 +00:00
fr33domlover
4b045118f9 Address project followers when posting ticket comment in regular UI 2019-06-30 02:23:58 +00:00
fr33domlover
d8da1f2abf Display summary and pretty JSON for notifications and for outboxes 2019-06-30 01:41:54 +00:00
fr33domlover
2109974709 Publish project outbox URL in project AP JSON 2019-06-30 01:18:52 +00:00
fr33domlover
add8a3a23b Display pretty JSON on user page 2019-06-30 01:17:47 +00:00
fr33domlover
89f2f91199 Remove build-time settings from settings template
The settings file is now used only during run time, and build-time settings are
set directly in source code. This patch removes those settings from the YAML
file, since they're unused, to avoid confusion.
2019-06-29 23:55:50 +00:00
fr33domlover
2376cbd479 When receiving Offer in inbox, expect ticket's 'published' NOT to be set 2019-06-29 23:32:34 +00:00
fr33domlover
d73c3928a0 In inbox display, show summary when available, otherwise show highlighted JSON 2019-06-29 23:16:52 +00:00
fr33domlover
f7b7a417eb Highlight JSON with Skylighting by default, Highligher2 isn't working on it 2019-06-29 23:15:41 +00:00
fr33domlover
90cb4fcd88 Data.Aeson.Encode.Pretty.ToEncoding: Use encodePrettyToTextBuilder as base
aeson-pretty implements by formatting using a text Builder, and the ByteString
is encoded from that. So instead of decoding the ByteString to produce Text or
Builder, use the Builder as the starting point, to match how aeson-pretty works
and save computation and weird backwards-decoding stuff.
2019-06-29 22:39:42 +00:00
fr33domlover
183e9a7754 Encode pretty JSON using encodePretty, highlighting doesn't do formatting! 2019-06-29 22:38:42 +00:00
fr33domlover
685b7ec2bc Add option to render pretty AP JSON using Skylighting
highligher2 doesn't have a JSON syntax and the JS lexer seems to be failing,
not sure exactly why yet. To have an alternative, I'm adding a Skylighting
option.
2019-06-29 20:31:01 +00:00
fr33domlover
590e3928a5 Vervis.Migration: Replace fromJust in migration #109 with informative error 2019-06-29 17:18:48 +00:00
fr33domlover
6d72d676e7 Switch OutboxItem's Activity from plain BL to an upgraded PersistJSONObject 2019-06-29 03:19:00 +00:00
fr33domlover
e10b4d452a Treat outbox items in DB as bytestrings to avoid depending on JSON parsing 2019-06-28 23:15:08 +00:00
fr33domlover
e5f9b34ad2 Unset ticket closer PersonId for tickets that aren't closed 2019-06-27 12:19:37 +00:00
fr33domlover
63689aef1a Fix SQL query that selects ticket summary data, was making getTicketsR fail 2019-06-27 11:47:23 +00:00
fr33domlover
9f3e45c113 When Accepting an Offer{Ticket}, automatically add author as ticket follower 2019-06-26 01:37:29 +00:00
fr33domlover
07f76d2a6f Publish Accept activity when creating a new ticket from the Offer 2019-06-26 01:12:11 +00:00
fr33domlover
0a4c2ad817 Add a new-ticket form to /publish page, and handle in sharer outbox 2019-06-23 12:39:44 +00:00
fr33domlover
4be444f5ab Bring back postTicketsR, now implemented using offerTicketC 2019-06-23 10:00:11 +00:00
fr33domlover
55fdb5437c Write C2S Offer{Ticket} handler, not used in any route handlers yet
This patch doesn't just add the handler code, it also does lots of refactoring
and moves around pieces of code that are used in multiple places. There is
still lots of refactoring to make though. In this patch I tried to make minimal
changes to the existing Note handler to avoid breaking it. In later patches
I'll do some more serious refactoring, hopefully resulting with less mess in
the code.
2019-06-22 18:03:20 +00:00
fr33domlover
d6b999eaf3 C2S: Handle recipient grouping in dedicated Vervis.API.Recipient module 2019-06-20 23:22:25 +00:00
fr33domlover
7c30ee2d52 Switch activityId from LocalURI to Maybe LocalURI, for C2S posting without ID 2019-06-19 08:53:31 +00:00
fr33domlover
1ae924558f Use updateGet for atomic access to projectNextTicket
`updateGet` isn't atomic by default. In PostgreSQL the default isolation level
if committed read, and an `update` followed by a `get` doesn't guarantee you
get the same value you sent. However I'm making a patch for `persistent` to
make `updateGet` atomic for PostgreSQL.
2019-06-18 10:47:01 +00:00
fr33domlover
fb909adf2e Handle Offer{Ticket} in project inbox, and turn DB ticketTitle into HTML 2019-06-17 19:55:03 +00:00
fr33domlover
4d5fa0551f Refactor the types used in activity authentication and handle project recipient
- The data returned from activity authentication has nicer types now, and no
  mess of big tuples.
- Activity authentication code has its own module now, Vervis.Federation.Auth.
- The sharer inbox handler can now handle and store activities by a local
  project actor, forwarded from a remote actor. This isn't in use right now,
  but once projects start publishing Accept activities, or other things, it may
  be needed.
2019-06-16 21:39:50 +00:00
fr33domlover
e1ae75b50c Add project outbox and outbox item routes 2019-06-16 21:37:31 +00:00
fr33domlover
a65979f5af Give Project an Outbox in the DB 2019-06-16 21:34:06 +00:00
fr33domlover
64a377b12f Use syntax highlighting in outbox item JSON display 2019-06-16 21:32:18 +00:00
fr33domlover
5aaf2ba8a9 Rename OutboxR to SharerOutboxR, because projects will have outboxes too 2019-06-16 14:58:00 +00:00
fr33domlover
8e01f9b416 FEDERATION.md: More detail about ticket creation 2019-06-16 14:47:33 +00:00
fr33domlover
ade24bb534 Pretty JSON display for getActorKey1/2 and getOutboxItemR 2019-06-15 19:03:39 +00:00
fr33domlover
499479b662 Decouple OutboxItem from Person via a new table named Outbox 2019-06-15 18:51:26 +00:00
fr33domlover
6452d239f2 Optional activity summary, set it when handling a Note in C2S 2019-06-15 16:24:34 +00:00
fr33domlover
68bdaf65a7 S2S sharer inbox: Handle Offer{Ticket} yay! 2019-06-15 14:51:48 +00:00
fr33domlover
2abb6a44a4 Load settings from default settings filename, not reading it from command line 2019-06-15 08:58:20 +00:00