Sending a private message without cc causes a 500 error
-
The logs from this are already cleared on my server, but when I sent a private message (standard Create/Note with a single recipient who also has a Mention in the tag property) from my custom software to my account here, I received a 500 error saying something like "cc is not iterable" (though I don't know the exact phrasing). When I included cc as an empty array, it started working. Not sure whether it was missing on Create or Note, maybe it was both.
-
The logs from this are already cleared on my server, but when I sent a private message (standard Create/Note with a single recipient who also has a Mention in the tag property) from my custom software to my account here, I received a 500 error saying something like "cc is not iterable" (though I don't know the exact phrasing). When I included cc as an empty array, it started working. Not sure whether it was missing on Create or Note, maybe it was both.
@rikudou thanks, can you file an issue on the GitHub repo?
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
GitHub (github.com)
-
@rikudou As far as I understand things, a 'private message' in ActivityPub is Create / ChatMessage, not Create / Note. I think NodeBB wouldn't be the only software to complain if 'cc' is missing from either part of Create / Note (although it's not expected in either part of Create / ChatMessage).
-
@rikudou As far as I understand things, a 'private message' in ActivityPub is Create / ChatMessage, not Create / Note. I think NodeBB wouldn't be the only software to complain if 'cc' is missing from either part of Create / Note (although it's not expected in either part of Create / ChatMessage).
@freamon
Create(ChatMessage)
is not part of ActivityPub. From my light research online it is something added by a Pleroma extension and possibly supported by Lemmy.NodeBB will automatically slot received non-public notes as chat messages.
-
@julian Oh, right. Thanks. But yeah, it's what Lemmy (and PieFed) uses, so I just assumed it was part of AP, and never looked into it any further.
I was thinking while typing this "I bet that means that chat messages from NodeBB to PieFed will fail", which I just tested, and sure enough they do (I'll make an Issue for it on PieFed's repo).
-
@julian Oh, right. Thanks. But yeah, it's what Lemmy (and PieFed) uses, so I just assumed it was part of AP, and never looked into it any further.
I was thinking while typing this "I bet that means that chat messages from NodeBB to PieFed will fail", which I just tested, and sure enough they do (I'll make an Issue for it on PieFed's repo).
Ah, that's unfortunate. When NodeBB sends a chat message out, it is just a regular Note with the recipients directly addressed, with no
as:Public
pseudo-user.So as long as PieFed handles mentioned-only notes the activity should be processed...
-
@julian It currently doesn't. If someone is Mentioned, the assumption is that it was part of post / comment in a community, and it fails because it can't find the community. I know that, for Lemmy, if you Mention someone in a comment, and they don't have a copy of the community (or they do and there's no local subscribers to it), then it will reject it. I don't know what it does if there's no community at all (I'll figure out a way to test it, on a server I can control).
-
@julian It currently doesn't. If someone is Mentioned, the assumption is that it was part of post / comment in a community, and it fails because it can't find the community. I know that, for Lemmy, if you Mention someone in a comment, and they don't have a copy of the community (or they do and there's no local subscribers to it), then it will reject it. I don't know what it does if there's no community at all (I'll figure out a way to test it, on a server I can control).
@freamon Update: no, Lemmy doesn't understand them either. It rejects Create / Note without a community with the usual "did not match any variant of untagged enum AnnouncableActivities"
-
FYI the next Lemmy version will use
Create/Note
for private messages. You can test it on voyager.lemmy.mlAdd note wrapper (fixes #2657) by Nutomic · Pull Request #5221 · LemmyNet/lemmy
Private messages and public comments are quite awkward in Activitypub, because the json format looks identical. They only way to differentiate them is to check for the presence or absence of https:...
GitHub (github.com)
-
FYI the next Lemmy version will use
Create/Note
for private messages. You can test it on voyager.lemmy.mlAdd note wrapper (fixes #2657) by Nutomic · Pull Request #5221 · LemmyNet/lemmy
Private messages and public comments are quite awkward in Activitypub, because the json format looks identical. They only way to differentiate them is to check for the presence or absence of https:...
GitHub (github.com)
@nutomic@lemmy.ml thanks for the update! That's awesome to hear
-
@julian I've added support to PieFed to successfully receive Create / Note as a PM from NodeBB.
From Nutomic's PR, it looks like you'll continue you get Create / ChatMessage from them, as also you will from PieFed. This currently fails, as I guess that it converts them into a Create / Note, but then complains of there being no 'cc'.
It doesn't make sense for PMs to be 'carbon copied' to anyone, so I'll raise an Issue at your repo.
-
@julian I've added support to PieFed to successfully receive Create / Note as a PM from NodeBB.
From Nutomic's PR, it looks like you'll continue you get Create / ChatMessage from them, as also you will from PieFed. This currently fails, as I guess that it converts them into a Create / Note, but then complains of there being no 'cc'.
It doesn't make sense for PMs to be 'carbon copied' to anyone, so I'll raise an Issue at your repo.
@freamon thanks! Happy to look into handling
Create(ChatMessage)
... I think the error aside, NodeBB would drop it anyway sinceChatMessage
isn't an expected post type.