Comments (23)
In your case, it is probably not necessary.
from writefreely.
if you must have it due to go structs being the way they are it should be set to null
.
from writefreely.
Gotcha. Besides this issue, a shared inbox isn't needed, right? But it's probably a good thing to have? (For a platform that isn't receiving posts from the fediverse.)
from writefreely.
Looks like adding omitempty
to sharedInbox
in web-core/data.go should fix this.
from writefreely.
Yep. Should an empty endpoints
property be left out, too?
from writefreely.
Ideally yes, but it doesn't matter. In LitePub, sharedInbox
would generally be preferred if it is set, but Pleroma should also guard against that invalid value :)
However, there's another problem, your Accepts are wrong:
16:50:14.945 [info] Unhandled activity
16:50:14.950 [info] {
"type": "Accept",
"object": {
"type": "Follow",
"to": "https://blog.dereferenced.org/api/collections/kaniini",
"state": "pending",
"published": "2018-11-11T16:50:12Z",
"object": "https://blog.dereferenced.org/api/collections/kaniini",
"id": "https://pleroma.site/activities/b5bb0ad7-72fa-46d6-bc44-ced092bc3436",
"context_id": 15104353,
"context": "https://pleroma.site/contexts/1b428def-c9b3-4a4b-9f6e-465c84701b02",
"cc": "https://www.w3.org/ns/activitystreams#Public",
"actor": "https://pleroma.site/users/kaniini"
},
"nickname": "kaniini",
"cc": [
"https://pleroma.site/users/kaniini"
],
"actor": "https://blog.dereferenced.org/api/collections/kaniini",
"@context": [
"https://www.w3.org/ns/activitystreams"
]
}
They need to be addressed to
me, not cc
me.
from writefreely.
Also
ERROR: 2018/11/11 16:50:14 log.go:26: Couldn't add new remoteuser in DB: Error 1364: Field 'followers' doesn't have a default value
Going to guess you need to do something with SQL there.
from writefreely.
oh, I see. nevermind on the to
/cc
. it's something else that Pleroma is hating.
from writefreely.
aha, the issue is that you're not generating an id
for the accept.
from writefreely.
Ah ok, I'll get that in there.
Also that followers
column shouldn't be in there -- it's a leftover from my local environment. This will fix that:
ALTER TABLE `remoteusers` DROP `followers`;
from writefreely.
Alright, I did that, and that got rid of that error, but publishing a blog post does not result in the blog post being distributed to subscribers.
from writefreely.
Ah, I see, it is only published directly if and only if I directly publish it there (instead of promoting a draft).
However...
17:16:11.027 [error] Task #PID<0.5979.0> started from Pleroma.Web.Federator terminating
** (Protocol.UndefinedError) protocol Enumerable not implemented for nil. This protocol is implemented for: DBConnection.PrepareStream, DBConnection.Stream, Date.Range, Ecto.Adapters.SQL.Stream, File.Stream, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, List, Map, MapSet, Postgrex.Stream, Range, Stream
(elixir) /home/buildozer/aports/community/elixir/src/elixir-1.6.5/lib/elixir/lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) /home/buildozer/aports/community/elixir/src/elixir-1.6.5/lib/elixir/lib/enum.ex:141: Enumerable.reduce/3
(elixir) lib/enum.ex:1919: Enum.uniq_by/2
(pleroma) lib/pleroma/web/activity_pub/utils.ex:525: Pleroma.Web.ActivityPub.Utils.make_create_data/2
(pleroma) lib/pleroma/web/activity_pub/activity_pub.ex:124: Pleroma.Web.ActivityPub.ActivityPub.create/1
(pleroma) lib/pleroma/web/federator/federator.ex:106: Pleroma.Web.Federator.handle/2
(elixir) lib/task/supervised.ex:88: Task.Supervised.do_apply/2
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Function: #Function<12.33571476/0 in Pleroma.Web.Federator.maybe_start_job/2>
Args: []
This is because your Create
activity does not have actor
set.
from writefreely.
Yeah, still need to send activities around moving posts from draft to a blog or between blogs.
But are you sure the Create
activity doesn't have an actor
? It should be getting set to the activity here, with the AttributedTo
field set here
from writefreely.
Yeah, actually your Create
is fine. Sorry about that. Digging a bit.
from writefreely.
Aha. I see the problem. Your Create
is not addressed, only the underlying object is.
from writefreely.
So you need to be able to directly access the Create
activity at its own URL / id
?
from writefreely.
I did this:
diff --git a/activitypub.go b/activitypub.go
index 60561af..5a27ca2 100644
--- a/activitypub.go
+++ b/activitypub.go
@@ -580,6 +580,8 @@ func federatePost(app *app, p *PublicPost, collID int64, isUpdate bool) error {
activity = activitystreams.NewUpdateActivity(na)
} else {
activity = activitystreams.NewCreateActivity(na)
+ activity.To = na.To
+ activity.CC = na.CC
}
err = makeActivityPost(actor, si, activity)
if err != nil {
and that works.
from writefreely.
by the way, Update
support is going to be a doozy. nobody has successfully implemented it yet :)
from writefreely.
Oh, got it. Will add that.
But yeah, just wanted to be future-proof by including Update
s. Read.as does implement it and it seems to work, at least in our little universe of implementations :)
from writefreely.
The problem isn't with processing the literal Update
, it's with preventing scenarios like:
- Molly posts a photo of her cat. People are boosting it like crazy.
- Few hours later, Molly
Update
s her cat photo to be nazi imagery.
Meaning that Announce
s need to become versioned, etc.
from writefreely.
Looks like other than the activities having to/cc on them (just copy them from the object, but you don't really need them on the object, just the activities themselves) and the Accepts not having an id
, everything seems pretty solid here. At least solid enough that I can use it for my blog.
from writefreely.
Meaning that
Announce
s need to become versioned, etc.
Ah, makes sense. Yeah that'll definitely be interesting!
For everything else, I've just pushed up their fixes. Just tested with Pleroma and it seems to work great!
from writefreely.
Thanks for your help on this. Closing now.
from writefreely.
Related Issues (20)
- wrong date on subscribers page HOT 4
- Version not available in Docker image HOT 1
- Font toggle isn't working in classics editor HOT 2
- Post attributed to non-existent collection
- RSS doesn't maintain formatting HOT 1
- Error setting up GotoSocial as OAuth provider: unable to exchange code for access token
- Server down error HOT 1
- Complaint: Unable to sign-up HOT 2
- View with the list of drafts doesn't render the markdown correctly HOT 6
- Unable to register "Server Error" HOT 1
- Viewing Customize -page causes error HOT 1
- mv-24
- Docker image for production
- The types of extractable image are very limited
- This page contains the following errors: error on line 1 at column 1: Start tag expected, '<' not found Below is a rendering of the page up to the first error.
- Errors when setting up Email newsletter HOT 2
- support work over proxy HTTP/HTTPS/SOCKS
- No spacing between different paragraphs
- i need account postheaven HOT 1
- Limited post size on MySQL backend
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from writefreely.