Nothing to see here, please move along.


Last active a month ago


Last active 1 year, 2 months ago
View more

Recent activity

Re: Sourcehut pages only uses HTTP/1.1 a month ago

From Marius Orcsik to ~sircmpwn/sr.ht-discuss

On 22-08-04 08:43:58, Simon Ser wrote:
> It is possible to set up HTTP/2 with tlstunnel, but the HTTP
> server needs to support reading ALPN fields from the PROXY protocol,
> which nginx can only do in the pro variant iirc.

I wonder if a similar setup can be done on top of Caddy? though I can't
say that I know how tlstunnel would interact with it (or if it needs to,
seeing that Caddy supports automatic let's encrypt certificate

Simon, could you point us to the how the setup for pages is done? I
can't find anything that looks relevant in the ~sircmpwn/pages.sr.ht

Re: Latest ref a month ago

From Marius Orcsik to ~sircmpwn/sr.ht-discuss

On 22-08-02 17:30:57, Charles Vejnar wrote:
> Hi,
> A list of all available tags/refs are available at
> https://git.sr.ht/~user/repo/refs. I am wondering if there is a way to link
> to the latest ref, with something like
> https://git.sr.ht/~user/repo/refs/latest. In particular, I would like to be
> able to provide a link to download (associated with a ref), valid for any
> version. Is that available? If no, would you consider it? Thanks.

Do you mean something more than the HEAD ref? (This also works if you use
the name of a branch: master for example)

Re: Two questions about extending go-ap a month ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-07-26 17:38:31, Anthony Wang wrote:
> ------- Original Message -------
> If you need more details or an actual minimal file that contains the issue, just let me know.

Hey Anthony, I managed to get an example running, but unfortunatelly I
didn't get too far into finding a solution.

I would say that probably your best bet to make it working as fast as
possible is to extract all the JSON functionality that you previously
updated in go-ap/activitypub (the functions that you needed to export to
make it work) and also improve the itemFn() function with the
functionality you want for the Repository type.

It's possible that the solution I come up with will also involve

Re: Two questions about extending go-ap 2 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-07-25 21:00:03, Anthony Wang wrote:
> I think this is because the internal itemFn() function in decoding_json.go hard-codes all the types that it supports.

It seems possible, I will have to take a look at that.

Could you please extract a minimal example which reproduces the issue
for me to work from?


Re: Two questions about extending go-ap 2 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-07-24 01:49:42, Anthony Wang wrote:
> Hi Marius,
> I have two questions about implementing ForgeFed over go-ap. I would like to add an alsoKnownAs property to the Person actor type, since we will be using this account migrations. What would be the best way to implement this in my ForgeFed package? Or should I fork go-ap/activitypub to make this change?

I honestly don't know what to answer to this. It probably depends on how
it will be easier for you to maintain.

My preferred way (the way I imagined the library to be used by others)
is to create your own gofed.Person structure and use that. (see the
reply to your second question about how to interface these new types
with the library's plumbing).

> Also, I noticed that unmarshaling binary into an activity variable will not work correctly if the object is a ForgeFed type. For instance, the following code doesn't work:

Re: GetID() vs GetLink() 2 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-07-21 15:45:06, Anthony Wang wrote:
> Hello Marius,
> It appears that GetID() and GetLink() do something very similar. Is there a difference between the two functions, and when should I use one instead of the other?

Hey Anthony,

They are similar, and it's possible that in the long run GetID() will be
dropped (at least from the Item interface).

They reason why they both exist is because I wanted an interface that
can be satisfied by both a "Link" object (which doesn't have an ID,
because it represents a "link" to a resource outside the confines of an

Re: [PATCH] Adding Repository MarshalJSON and UnmarshalJSON methods 2 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-07-11 18:44:42, Anthony Wang wrote:
> On Monday, July 11th, 2022 at 09:51, Marius Orcsik <marius@federated.id> wrote:
> I'm currently using a fork of the module with all the Write and Load functions exported: https://gitea.com/Ta180m/activitypub/commit/d7fe75e8a60cea702b7665512358d397f49ed28a
OK, thank you.

I'll try to have a look and get back to you if I can merge it.


Re: [PATCH] Adding Repository MarshalJSON and UnmarshalJSON methods 2 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-07-10 16:18:28, Anthony Wang wrote:
> I finished implementing most of the ForgeFed types and I ended up using the following go-ap functions: WriteItemJSONProp, Write, WriteTimeJSONProp, WriteItemCollectionJSONProp, Write BoolJSONProp, JSONGetItem, JSONGetTime, JSONGetItems, JSONGetBoolean, LoadActor, and LoadObject. I needed a few more functions exported than what I initially stated, since the JSON properties that ForgeFed adds have several other types, like times, booleans, and collections.

Hey Anthony, good to hear back from you.

If you feel like it, could you please send a patch with the changes? In
the long run I'm not sure I want to have all this functionality in the
same package with the vocabulary, but for the moment it will probably be
helpful to have everything there.

Let me know.

Re: go-ap is now a dependency of Gitea 3 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-06-20 15:58:11, Loïc Dachary wrote:
> For the record, as of yesterday[0] go-ap is a dependency of Gitea for the purpose of implementing federation with ActivityPub.

Hi Loïc,

If I'll have any changes to the libraries that might impact Gitea, how
should I announce them? Usually I just send an email here, but probably
I can open a ticket on github for you guys.


Re: [PATCH] Adding Repository MarshalJSON and UnmarshalJSON methods 3 months ago

From Marius Orcsik to ~mariusor/activitypub-go

On 22-06-16 21:40:02, Anthony Wang wrote:
> I wrote my own version of repository.go (https://gitea.com/Ta180m/gitea/src/commit/dbb1d5ba23e1fede7b505d0b1ee24bd4e9d64dd4/models/forgefed/repository.go) reusing various Write and Load functions from go-ap/activitypub, and it came out to be only 70 lines. I'd recommend exporting at least write, writeItemJSONProp, loadActor, and loadObject, which should be enough for implementing ForgeFed.

Thank you Anthony,

This is great feedback, I added a ticket for this[1] but the end result
might have a different shape than you're suggesting.


[1] https://todo.sr.ht/~mariusor/go-activitypub/248