nextcloud / social

🎉 Social can be used for work, or to connect to the fediverse!
https://apps.nextcloud.com/apps/social
GNU Affero General Public License v3.0
488 stars 59 forks source link

Connectivity issue with Pleroma #1174

Open gudzpoz opened 3 years ago

gudzpoz commented 3 years ago

Describe the bug

Pleroma can't follow Nextcloud/Social users or receive posts from them (while for Mastodon it works just fine).

  1. Pleroma cannot fetch the user info when searching '@user@nextcloud.site';
  2. After I edited the code and added Content-Type: application/activity+json header (see below) to make the follow work, Pleroma still cannot receive posts.

To Reproduce

1. Cannot fectch info

Steps to reproduce the behavior:

  1. Fresh install Nextcloud 20.0.4.
  2. Install Social (0.4.2) from /settings/apps
  3. Search @user@somenextcloud.site on Pleroma and Mastodon respectively
  4. Pleroma shows no matching user while Mastodon correctly shows @user@somenextcloud.site

This is probably because Pleroma doesn't accept Content-Types other than application/activity+json and application/ld blah blah (see a Pleroma issue for more information)

So I added a Content-Type: application/activity+json to the TNCDataResponse, and the fetching and following works now.

2. Cannot receive posts

I suspect that this, too, could have something to do with Content-Type: application/activity+json. But I am not familiar with the structure of Nextcloud or Social, so I might not be able to investigate further.

Expected behavior

This should works with Pleroma.

Client details:

Server details **Social app version:** 0.4.2 **Operating system**: Ubuntu 20.04 LTS **Web server:** Nginx 1.19.5 **Database:** MySQL **PHP version:** 7.4 **Nextcloud version:** (see Nextcloud admin page) 20.0.4
Logs #### Nextcloud log (data/nextcloud.log) ``` (Might be too large, will upload if needed later) ``` #### Browser log ``` (Irrelevant to the issue) ```
gudzpoz commented 3 years ago

Edit:

  1. Adding Content-Type: application/activity+json to the TNCDataResponse only makes fetching actors work. (The following works on my end because I've configured nginx (on pleroma server) to modify the headers of all request to Pleroma's inbox, and therefore Pleroma recognizes the Accept activity.)
  2. Since I've edited the headers, my Pleroma seems to be accepting posts. However, I can only see the posts in the Pleroma's admin panel, not in the follower's timeline nor in the global timeline (so I thought posts wasn't received). This might be a problem with pleroma itself.