lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

It is impossible for a Lemmy user to post on a Friendica forum

Open informapirata opened this issue 2 years ago • 24 comments

I've noticed a federation issue between Lemmy and Friendica regarding posts.

In practice, although the two platforms are well integrated AND although the Friendica forums are almost the same as a lemmy community (so much so that a lemmy user can follow a friendica forum!), a lemmy user cannot post a thread on a Friendica forum.

I think the problem comes from two aspects:

  1. Lemmy mentions don't work well with Friendica, and a Friendica forum can only re-share posts from a user who mentions it. What in effect is a forum subscription, seems not to be recognized by Friendica as a follow action

  2. a lemmy user cannot follow another user and the Friendica forums are to all intents and purposes a user, but this Friendica user can only re-share posts that are published by a user who follows him.

However, it would be interesting if the two systems could talk to each other without penalizing lemmy users.

NB: doing some tests, I could see that the only way I was able to crosspost a post BOTH on a lemmy community AND on a Friendica forum group was the following: link https://poliverso.org/display /0477a01e-1363-c79d-1a5e-6f7729031594

In this case, I wrote

  1. from a Friendica account
  2. a post with title
  3. mentioning the lemmy community FIRST in the text
  4. and THEN the Friendica forum group

Here the mirror link created by feddit of the post in the lemmy "test" community: https://feddit.it/post/130145

However, there is no mirror created by feddit, and in fact if you look at the Friendica forum group @[email protected] from lemmy, you won't find that post. However any social user (mastodon, Friendica, Misskey, Pleroma) who follows the testgroup group would have seen that post...

informapirata avatar Feb 05 '23 16:02 informapirata

I would like to point out this thread that I only learned about today, which mentions the problem of the federation between Friendica groups/forums and the Lemmy community

https://socialhub.activitypub.rocks/t/help-improving-federation-between-lemmy-and-other-projects/2308/8

informapirata avatar Feb 06 '23 16:02 informapirata

This was previously discussed in https://github.com/LemmyNet/lemmy/issues/2144. Based on a quick skim it looks like the problems mentioned were resolved, but no one actually tested if it works.

cc @annando

Nutomic avatar Feb 07 '23 14:02 Nutomic

Questo è stato discusso in precedenza nel #2144 . Sulla base di una rapida occhiata sembra che i problemi menzionati siano stati risolti, ma nessuno ha effettivamente testato se funziona.

I did some tests and I can confirm that Friendica groups/forums are unable to re-share posts published by a Lemmy user.

Here some examples:

Test n.1 from Lemmy 0.17 a Friendica 2023.01 (with subscription only, but without mentioning the user address of the group) Link: https://lemmy.ml/post/748527 How is it displayed in Friendica? https://poliverso.org/display/44b525e5-3b1d6e71af16aeb4-f705a903

Test n.2 from Lemmy 0.17 a Friendica 2023.01 (with addition of mention to the user address of the group according to Lemmy formatting) Link: https://lemmy.ml/post/748528 How is it displayed in Friendica? https://poliverso.org/display/44b525e5-3b1d6e71af16aebb-10e65cc4

Test n.3 from Lemmy 0.17 a Friendica 2023.01 (with addition of mention to group user address, without using Lemmy formatting) Link: https://lemmy.ml/post/748530 How is it displayed in Friendica? https://poliverso.org/display/44b525e5-3b1d6d71af16ace0-c451c129

If you log in from a Friendica account, you will realize that the Lemmy message is not shared by the Friendica Group/Forum.

Yet Friendica is already able to automatically re-share messages posted by specific Lemmy users

informapirata avatar Feb 08 '23 16:02 informapirata

Questo è stato discusso in precedenza nel #2144 . Sulla base di una rapida occhiata sembra che i problemi menzionati siano stati risolti, ma nessuno ha effettivamente testato se funziona.

cc@annando

I confirm that the problem has not yet been resolved. I am sure that it depends on these two aspects.

I think the problem comes from two aspects:

  1. Lemmy mentions don't work well with Friendica, and a Friendica forum can only re-share posts from a user who mentions it. What in effect is a forum subscription, seems not to be recognized by Friendica as a follow action
  2. a lemmy user cannot follow another user and the Friendica forums are to all intents and purposes a user, but this Friendica user can only re-share posts that are published by a user who follows him.

So two things should be fixed:

  1. solve the problem of mentions that, on Lemmy, don't work well in the opening post of the thread
  2. understand what input comes to a Lemmy community when a user opens a thread in a community; what input a Friendica forum receives when a user opens (thinks he/she is opening) a thread in a forum

informapirata avatar May 24 '23 16:05 informapirata

Can you share the activities which Friendica sends for these actions? They should be logged by the server right after you perform the action.

Nutomic avatar May 25 '23 10:05 Nutomic

Some time ago I tested if I could subscribe to a Friendica forum in Lemmy but wasn't able doing so. When I eventually will achieve that, then I will try performing some tests. I really would like to see that Friendica can integrate into Lemmy because that opens up new possibilities. In the past people sometimes complained about the problem that you need to have a Friendica account to ask something in the Friendica support forum when - for example - your server broke down. So being able doing that from Lemmy would be great.

annando avatar May 25 '23 10:05 annando

Yes I agree. If you can tell me which fields Friendica expects that Lemmy is missing, that would be very helpful. For reference here are all the activities that Lemmy currently sends.

https://github.com/LemmyNet/lemmy/tree/main/crates/apub/assets/lemmy/activities

Nutomic avatar May 25 '23 13:05 Nutomic

I hope that it will work with the recent "develop" branch, since I (mostly) implemented the FEP concerning the audience. I have to create an account on some Lemmy installation with a recent version to very this.

annando avatar Jun 27 '23 22:06 annando

I made some progress. On my instance the posting from Lemmy does work now. But I saw that my Announce activities are not accepted on the destination system (the delivery failed with the return code 400). The message looks like this:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/security/v1",
        {
            "vcard": "http://www.w3.org/2006/vcard/ns#",
            "dfrn": "http://purl.org/macgirvin/dfrn/1.0/",
            "diaspora": "https://diasporafoundation.org/ns/",
            "litepub": "http://litepub.social/ns#",
            "toot": "http://joinmastodon.org/ns#",
            "featured": {
                "@id": "toot:featured",
                "@type": "@id"
            },
            "schema": "http://schema.org#",
            "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
            "sensitive": "as:sensitive",
            "Hashtag": "as:Hashtag",
            "quoteUrl": "as:quoteUrl",
            "conversation": "ostatus:conversation",
            "directMessage": "litepub:directMessage",
            "discoverable": "toot:discoverable",
            "PropertyValue": "schema:PropertyValue",
            "value": "schema:value"
        }
    ],
    "id": "https://pirati.ca/objects/ec054ce7-8464-9d09-720e-8f0782488153",
    "type": "Announce",
    "actor": "https://pirati.ca/profile/test1",
    "published": "2023-06-29T04:32:50Z",
    "instrument": {
        "type": "Service",
        "name": "Friendica 'Giant Rhubarb' 2023.09-dev-1522",
        "url": "https://pirati.ca"
    },
    "to": [
        "https://pirati.ca/profile/heluecht",
        "https://discuss.tchncs.de/u/heluecht",
        "https://www.w3.org/ns/activitystreams#Public",
        "https://pirati.ca/followers/test1"
    ],
    "cc": [],
    "audience": "https://pirati.ca/profile/test1",
    "object": "https://pirati.ca/objects/ec054ce7-1464-9d09-7044-475015364801",
    "signature": {
        "type": "RsaSignature2017",
        "nonce": "3c876689495275184a415c0acde068af291868a86353d966aacfe631718ee2c8",
        "creator": "https://pirati.ca/profile/test1#main-key",
        "created": "2023-06-29T04:54:10Z",
        "signatureValue": "V56q3MGpK2fq6r5WzTVfMWuo/j1phINcMwyZyCMY+ezrStmwSOk5G23YyIz1R+k3PjLyzflp1xueCKVwC3OOHTXUnWCvHF6PntTc3e7BCgymiHr2u4aQrry+vjStQ+mQguKO43GDKFtq7EVhTzJnM4G0vx5k/8fFqq62rKGrz3VdyYs0FE5oQO5+fWbc9n4ueLzI+sIxkL6HP5ZaCngldwz8qa8rRTa/wya/5n7+37vU9ctZawDfynJmcbVvI5olZ0nG1jvH1PkJS4meZMPkgPF0nzJ0qrn1iJ/6HnOqsLnTVy7Ipev1suJd0mQE1cHSdkKeGQm2bheRgmCEKWTB6QSNJ5hLdp0PMtUHSCgkSdzUrqpZ8A9skutEAPXvnbgMQ3WvJ0mDB53QuNr4X/3/IZBLaBDkQsMsRGk6gOcCzxBnePMQGIZvaRc//EUJ7UMcIM1+jAC5I1AspyFeVhGe4qaDHXqFu6dLsr7IN973+MaEVXo/6dfdDMGxMffqpQb6p58gL9CrMizKqqhLMW1B5n1tDMxcUO5A12FCsq0CZ2YCaFZxt6h5zDBcuT3uH/5Vga2Se1HX9ch2mH3uV8CvIyx8AMuuWuIS1U0NKjoKOFR6UghyF0njqNG0PGtgFrvFykaYJQ064B04u7eM9NVmUEUvtCSwHT0zu1rm2CJTw58="
    }
}

annando avatar Jun 29 '23 04:06 annando

It looks like you are announcing a Note, but Lemmy expects the object of announce to be an activity (eg Create/Note). Example

Nutomic avatar Jun 29 '23 08:06 Nutomic

I know that Lemmy transmit activities, since we process them upon receiving. But the other systems are always announcing the content object and not the activities. I'm unsure if all systems can process shared activities, so we cannot simply change this behaviour on our side.

annando avatar Jun 29 '23 08:06 annando

I now did a test - but the post was also rejected (I tested with and without the context):

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/security/v1",
        {
            "vcard": "http://www.w3.org/2006/vcard/ns#",
            "dfrn": "http://purl.org/macgirvin/dfrn/1.0/",
            "diaspora": "https://diasporafoundation.org/ns/",
            "litepub": "http://litepub.social/ns#",
            "toot": "http://joinmastodon.org/ns#",
            "featured": {
                "@id": "toot:featured",
                "@type": "@id"
            },
            "schema": "http://schema.org#",
            "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
            "sensitive": "as:sensitive",
            "Hashtag": "as:Hashtag",
            "quoteUrl": "as:quoteUrl",
            "conversation": "ostatus:conversation",
            "directMessage": "litepub:directMessage",
            "discoverable": "toot:discoverable",
            "PropertyValue": "schema:PropertyValue",
            "value": "schema:value"
        }
    ],
    "id": "https://pirati.ca/objects/ec054ce7-1564-9df0-7522-02b737334686",
    "type": "Announce",
    "actor": "https://pirati.ca/profile/test1",
    "published": "2023-06-29T20:58:29Z",
    "instrument": {
        "type": "Service",
        "name": "Friendica 'Giant Rhubarb' 2023.09-dev-1522",
        "url": "https://pirati.ca"
    },
    "to": [
        "https://pirati.ca/profile/heluecht",
        "https://discuss.tchncs.de/u/heluecht",
        "https://www.w3.org/ns/activitystreams#Public",
        "https://pirati.ca/followers/test1"
    ],
    "cc": [],
    "audience": "https://pirati.ca/profile/test1",
    "object": {
        "@context": [
            "https://www.w3.org/ns/activitystreams",
            "https://w3id.org/security/v1",
            {
                "vcard": "http://www.w3.org/2006/vcard/ns#",
                "dfrn": "http://purl.org/macgirvin/dfrn/1.0/",
                "diaspora": "https://diasporafoundation.org/ns/",
                "litepub": "http://litepub.social/ns#",
                "toot": "http://joinmastodon.org/ns#",
                "featured": {
                    "@id": "toot:featured",
                    "@type": "@id"
                },
                "schema": "http://schema.org#",
                "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
                "sensitive": "as:sensitive",
                "Hashtag": "as:Hashtag",
                "quoteUrl": "as:quoteUrl",
                "conversation": "ostatus:conversation",
                "directMessage": "litepub:directMessage",
                "discoverable": "toot:discoverable",
                "PropertyValue": "schema:PropertyValue",
                "value": "schema:value"
            }
        ],
        "id": "https://pirati.ca/objects/ec054ce7-3364-9df0-72b7-5f0816789303/Create",
        "type": "Create",
        "actor": "https://pirati.ca/profile/heluecht",
        "published": "2023-06-29T20:58:26Z",
        "instrument": {
            "type": "Service",
            "name": "Friendica 'Giant Rhubarb' 2023.09-dev-1522",
            "url": "https://pirati.ca"
        },
        "to": [
            "https://www.w3.org/ns/activitystreams#Public",
            "https://discuss.tchncs.de/u/heluecht",
            "https://pirati.ca/profile/test1"
        ],
        "cc": [],
        "audience": "https://pirati.ca/profile/test1",
        "object": {
            "id": "https://pirati.ca/objects/ec054ce7-3364-9df0-72b7-5f0816789303",
            "type": "Note",
            "summary": "",
            "inReplyTo": "https://discuss.tchncs.de/post/379390",
            "diaspora:guid": "ec054ce7-3364-9df0-72b7-5f0816789303",
            "published": "2023-06-29T20:58:26Z",
            "url": "https://pirati.ca/display/ec054ce7-3364-9df0-72b7-5f0816789303",
            "attributedTo": "https://pirati.ca/profile/heluecht",
            "sensitive": false,
            "content": "<span class=\"h-card\"><a href=\"https://discuss.tchncs.de/u/heluecht\" class=\"u-url mention\">@<span>heluecht</span></a></span> Ping",
            "contentMap": {
                "de": "Ping"
            },
            "source": {
                "content": "Ping",
                "mediaType": "text/bbcode"
            },
            "attachment": [],
            "tag": [
                {
                    "type": "Mention",
                    "href": "https://discuss.tchncs.de/u/heluecht",
                    "name": "@[email protected]"
                }
            ],
            "to": [
                "https://www.w3.org/ns/activitystreams#Public",
                "https://discuss.tchncs.de/u/heluecht",
                "https://pirati.ca/profile/test1"
            ],
            "cc": [],
            "audience": "https://pirati.ca/profile/test1"
        },
        "signature": {
            "type": "RsaSignature2017",
            "nonce": "1048011bae0d32bd552995a72bf008197f284dd69f28899a11a28915bbfe94f6",
            "creator": "https://pirati.ca/profile/heluecht#main-key",
            "created": "2023-06-29T21:01:22Z",
            "signatureValue": "tGAETpiyaqLOINnNG8xcOHXgjQtAhqndMYG0sWdVWczyA2nup9W7qi6JPl62xrpgWawccezKyrbC/JbBWSrMnt3kzBn1+PnoiQOvBi06WXJYgfAzsrq2BauEMGI7ObDy2oEyGXJwBEvEIEShbMppvX4wfNvZs8YNLDhD7jqzPExaVwTZF80NbIhHsbOkI1hjAYZ4kLBK0cLSUC2l+7kQh/kRMvjXTs3ue6MlVRWxZENHW1GNKTGEWnDjKE4t+Gt95e2dfXOeMu8hMx4eH/7lb8zXhVaVRpLYJHltgRhnVAfzBrJWWNuqqJ8JRHnujgA5UutA1hkUbgglIm9xqHJ6KiXGuNs3/CFlGS9mjhWluIDLRAaXOl8MHURIqVtG57oVy0Kl8slYhbzVFu1qY3KeejosLLY6SVr6XkQuJm+FfWGznhyGW7xqe8LGitbV1Dka3aj4QV6SEqjKw5RNOdJxiI7QGB9zklTPuvcYdKaUUwCvc1yGiHu3zhEIXeBnZffVwCwQ/Nacge1q8+sbLZ4zyCuCJnxy0QaB1S5XeNZY+xPrzJEN/4g+NS9ACNZ8s/wWAIAAIUmOZj+9mLL/i1W3uJXz/OXBEPtalUfsw4KlhGD6nTXUpb3cJBVQ0CrhKncggbaK8pc9MCFRy4OEfXhYzzLKMiUklHprN+RQFW3pB48="
        }
    },
    "signature": {
        "type": "RsaSignature2017",
        "nonce": "3da8e708a826a0000a72b4db9e599e48b796c8c0900b187c9da830a02dfd0d22",
        "creator": "https://pirati.ca/profile/test1#main-key",
        "created": "2023-06-29T21:01:22Z",
        "signatureValue": "aIFPviPkGMt51Mm+yphlYXE4oj14+PPL7sOKc8+mvE4W6kQtebKKuY/BBT9fSyZfIqhGIvGIEtvAQUEWeNrDWy8OjSEQxKDJbKUZBNO6elQaQf8EHSoNvhAAgorF7CGfClqwzCBhygDLX3aKrzaOnxnjatn1n8uRLxMypMTPMV5YGdUmmn+eHhPfRhFlyGprsTf5xcwaV6dOWTDyENgQygu4XGh8Yi6V+z/9RRRZHco5ZL0TC+N21LRHI1lhJmWRUJICEuQACbtlptqGqJ7727oktPw93ihFJf1+lNbns6s5FlQhBIQeN/T5gVzncayK5KGVqOmgBTsKBRtVg1zQPIxi+SPmFDvSMsfAqcmA11+/gNx3nNag0ZJ7UId7rYK3EoKdpYTcixOU9RD4D4KHtbDNZRE6osKV3yzuaGu9wFiLdlrjZVhTBYGg5J6yYP6SqZjpa7U/0zfg5Hh9TgeVhDH3ExTADy2EAKv+0n6Q5RjAL0qrpl3sJeC172rGm62LymvbXq9okH7GLpD8ZErIEYV2rf3IQYj0z6q2rGCoJO3ZFTLuywM9c+bqbSa6CFxjPo/Y6uNDuo5JMfIVaoor23GGThLa5iyodu57x0ltlQs9kuT0KJABeMJXNKzFkDRZFENq8D/BFfBP3F/ij+xHZDXL0ZTL/jQ5bnEQZJPd0Aw="
    }
}

annando avatar Jul 01 '23 07:07 annando

Non sono sicuro che tutti i sistemi possano elaborare attività condivise, quindi non possiamo semplicemente cambiare questo comportamento dalla nostra parte.

Maybe I'm too optimistic, but I think it would be enough to make mentions of Lemmy work in the first opening message of a thread!

From the rel. 0.18 by Lemmy in fact the first necessary condition has finally been solved: follow the forum. Lemmy subscriptions are now correctly interpreted as follows.

At that point, it would be enough for me to mention the Friendica forum to post on it. But unfortunately the mentions, in the first message don't work yet.

informapirata avatar Jul 03 '23 16:07 informapirata

@informapirata with the changes that I applied, that first message will work. But the problem is that currently users on other Lemmy servers won't get your post, since there is this issue in the distribution.

annando avatar Jul 04 '23 10:07 annando

Can this be closed then? Mentions could be opened as a separate issue.

dessalines avatar Oct 18 '23 20:10 dessalines

We can always create a new issue, sure. I'm currently slightly unsure, if there is still any issue.

annando avatar Oct 18 '23 20:10 annando

I have not tested the Announce activity you posted above, Lemmy parses it without any problems. What response do you get when it is rejected?

Nutomic avatar Oct 19 '23 13:10 Nutomic

I have to check what is working and what not. But currently I don't have got the time for that.

annando avatar Oct 19 '23 18:10 annando

I have to check what is working and what not. But currently I don't have got the time for that.

I did a test just today: Lemmy 0.18.5 publishes the message by subscribing to a "Friendica group", but the "Friendica group" is unable to re-share that message and the reason is clear and does not depend on Friendica: a "Friendica group" cannot reshare a message in which the "Friendica group" is not mentioned.

informapirata avatar Oct 19 '23 19:10 informapirata

@informapirata you are using 2023.05. There had been changes in the current develop/release candidate.

annando avatar Oct 19 '23 20:10 annando

There had been changes in the current develop/release candidate

Optimal! Then I'll have to wait for 2023.11 so I can try this change. Thanks for all

informapirata avatar Oct 19 '23 21:10 informapirata

You could try 2023.09-rc https://github.com/friendica/friendica

foss- avatar Oct 19 '23 22:10 foss-

Potresti provare 2023.09-rc

Unfortunately I don't have a real test environment and therefore I prefer not to install -rc and, in fact, I usually wait a week before installing the latest release

informapirata avatar Oct 19 '23 22:10 informapirata

@informapirata Can you test if federation is working better with the latest versions of Friendica and Lemmy?

Nutomic avatar Jan 03 '24 13:01 Nutomic

Gonna close this, please open a new issue if there are still problems.

Nutomic avatar Mar 15 '24 11:03 Nutomic

Fine with closing, just a polite ping for @informapirata: where you able to test with Friendica 2023.12 stable if this now works as expected?

foss- avatar Mar 15 '24 12:03 foss-

Fine with closing, just a polite ping for @informapirata: where you able to test with Friendica 2023.12 stable if this now works as expected?

Good morning and thanks for the ping!

At the moment it seems that the problems that prevented full functional use of a Friendica group by a Lemmy user have been resolved.

In detail:

  1. if a Lemmy user publishes a post https://feddit.it/post/6364478

  2. on a Friendica group, then that post is displayed correctly on the page of its instance dedicated to that group https://feddit.it/c/[email protected]

  3. and in fact the Friendica page of that group shows the re-sharing of the post https://poliverso.org/profile/testgroup

  4. viewing the post published by the Lemmy account from Friendica, you can see that it was reshared by the Friendica group https://poliverso.org/display/762a4026-a1055b5f966fe3bf-8a2f3368

  5. Even those who follow the Friendica da mastodon group can see the post published by Lemmy https://mastodon.uno/@[email protected]/112099794111192539

I would therefore say that the problem seems to have been solved

Thanks @Nutomic Thanks @dessalines

informapirata avatar Mar 15 '24 17:03 informapirata