Plemmy seems to be no longer maintained. Use Pythörhead: https://github.com/db0/pythorhead
Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
Thanks, I'll check that out! Any idea if you can send and receive private messages with it (I'm not at my computer just now 🥺)?
Yes you can.
Got it up and working, but only if the receiver is on my (lemmy) server, any idea if that's a voluntary limitation?
I could see that as a privacy measure.
Everything on Lemmy is open anyways but maybe the maintainer didn't want to be the guy to make Lemmy data that accessible. So it's a limitation. You can only have Lemmy data if you are hosting the server and the community.
I'm not aware of anything, maybe there's something in the Lemmy config? Is federation generally working?
I can send messages manually (on my lemmy server to another), but the problem is I can't find "how to do it" programmatically. The examples are only for sending messages on the same server, I'm digging around in the git repo but haven't found anything that works yet.
BTW is it db0 the creator?! I should maybe head over to his server and see if he's available.
You can send messages to anyone with pythorhead, you just do it via your own lemmy server and need to provide the full username address
Hello! Thanks for stepping by!
I only have either https://lemmy.world/u/Valmond (is that the 'full username address'?) or the (I guess lemmy.world local id) 370373, but lemmy.private_message chokes on both (lemmy here being the Lemmy object connected to my server).
I haven't found a API doc/guide, so I'm just modifying the examples.
Any info greatly appreciated!
use get_user to get the user json, then PM using the id
key of that
I'm confused, here is what I'm doing:
-
Make a Lemmy object: lemmy
-
Connect it to my server lemmy.mindoki.com (with a user, pwd)
-
lemmy.private_message('hello', *id")
Note: I have 1 user on my server, and one user on lemmy.world.
-
If I make a Lemmy object, connect it to my server (lemmy.mindoki.com), and asks for a user and use his id, it works.
-
If I make a Lemmy object, connect it to lemmy.world instead, and asks for a user there, and use his id, it doesn't work.
Which seems logic, the id is local to the instance isn't it?
For example, on my server it's 1263 for my user, on lemmy.world it's 370373, I can't just use that number without anything else to identify a user, right?
So, you send a PM via your own server, so it's how your server refers to the remote user. So your own server's ID of that user matters, not the remote server's ID.
Aah yes of course 😅! Made it work, thanks a lot!!