1
1
submitted 1 month ago by aprentic@lemm.ee to c/lemmydev@lemm.ee

I'm trying to follow the instructions at https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/

I get the error message: {"error":"Unable to fetch key JSON at https://<domain>/actor"}

The actor file is located at: /var/www/<subdomain>/actor

that contains:

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/security/v1"
    ],

    "id": "https://<domain>/actor",
    "type": "Person",
    "preferredUsername": "alice",
    "inbox": "https://<domain>/inbox",

    "publicKey": {
        "id": "https://<domain>/actor#main-key",
        "owner": "https://<domain>/actor",
        "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnioC3W5cHbHLo+ln4QPm\n6EX1Ypvs5h+h47b5RwhF+2N84dSHXURUuA6a33+IlVqiO/3gGxIX+4MJuSDAxGZM\nWFDbuqDnHft2zWorKmIqyDzSSB/oMSqOVL8QV1KYWsCyhw9v2l5U6EIw2Z7u3Fc9\nW19dumK0ieL7CPME2dJGV5quBoa2AGg0D36XCp8hAWMXGUnlEcaqjyePJg9/quZn\no3W/+h5ujoUQG73SIUaJdsK16Q0E7o5N7JP7pqqE8p8pEXtpwXJJYE9y9ItTqvRS\na29xymyboCI6jSK+VTgjz1tj6W+EGQsPfka6t8Gq82NL00VxBEYb/eiEFuOSy4RL\ndwIDAQAB\n-----END PUBLIC KEY-----"
    }
}

I haven't been able to find out what that error means. Is it unable to find the actor file? Maybe I should change /actor to /actor/ and put the file inside that? If so, what should the filename be? Is it some problem with the public key inside the JSON? Is it mad about the newlines?

2
1
submitted 1 month ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

I’ve updated @Mistral@lemmings.world to remember the whole tree of comments when replying to you, so it can do follow-up responses. You still have to mention it on every message, though. Example in the comments.

3
1
submitted 3 months ago* (last edited 3 months ago) by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

There's now a swagger documentation for the Lemmy API.

See also https://mv-gh.github.io/lemmy_openapi_spec/

4
1
submitted 3 months ago* (last edited 3 months ago) by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

I just implemented a user overview of mixed posts and comments, but I'm unsure how to do so while respecting sort (hot, new, old, etc.). Currently I merge the user's comments and posts into a list, then sort them all by timestamp.

Because sorting is handled on the server, and merging posts/comments happens after, I can't see how I can't respect sort and still merge the two sets. Does anyone have any pointers?

I expect a similar issue would arise for the unified inbox view also (replies, mentions, and private messages), although in that case there's less need to sort by anything other than recency.

EDIT: here's the relevant ts code in the official lemmy ui. it sorts by date if sort is new, which i already do, then otherwise it just sorts by "score".

https://github.com/LemmyNet/lemmy-ui/blob/79ed5903354067636f5eb9686ff0a005117bc541/src/shared/components/person/person-details.tsx#L245

5
1
submitted 3 months ago by silas@programming.dev to c/lemmydev@lemm.ee

I recall someone mentioning a way to do it through an ActivityPub “resolve object” endpoint (or something like that) but I couldn’t find anything on it again. #1101 will solve this, but how are you guys handling this in the meantime?

6
1
submitted 5 months ago by UraniumBlazer@lemm.ee to c/lemmydev@lemm.ee

So I'm developing a mobile client using React Native, where I'm utilizing Lemmy's messaging functionality as well. This makes it extremely crucial to have notification support (including push notifications).

How are you guys dealing with this problem? This is what I think an elegant solution could look like. We would need to achieve two things:

  1. Bring back websockets only for notifications by directly changing lemmy server side code.
  2. Find where the email notification code is at, and simply implement expo notifications there.

Whaddya think?

7
1
submitted 5 months ago by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

currently my client displays child comments/replies to a given comment based on a get-comments request and the sort arg. if a child comment is returned by such a request, it will be included as part of the tree, but otherwise not. it means the child is subject to sorting itself.

but what is needed is that if a parent comment is displayed/returned by request/sort arg, all its children should be also. that seems to me to be how the webUI works also.

any tips on how to ensure that?

8
1
submitted 7 months ago by cynber@lemmy.ca to c/lemmydev@lemm.ee

cross-posted from: https://lemmy.ca/post/6770347

This is a very small update, but hopefully it's helpful! As I mentioned in the last update, I'm a little tied up with other commitments right now, so I haven't had a chance to implement the other features on the to-do list. This one was requested the other day, and it was simple to add since I could reuse a lot of existing code.


Links:


❓ What is Instance Assistant?

If you're new to Instance Assistant, it is a browser extension with a collection of tools and features to simplify your browsing experience on Lemmy and Kbin. It is available on Chrome, Firefox, and Edge; you can also install it from the releases page on GitHub.

For a full list of features, please see the GitHub homepage: https://github.com/cynber/lemmy-instance-assistant


⭐ What's new in v1.2.6?

  • Redirect user profile pages: When you want to message a user and click on their profile, you might end up on a foreign instance. To message them, you need to modify the URL or copy/paste. Instead, you will now find a little button to jump you to your home instance.


💛 Also

Thank you for all the suggestions and feedback! Like I said before, I'm really happy to see that people are using the extension and finding it useful. Please continue to make suggestions and contribute your expertise.

Cheers :)

9
1
submitted 8 months ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

My Lemmy Schedule app now includes the option to get notified of new posts in a specific community!

In case you haven't heard about the app before, here's what other things it can do:

  • schedule a post and post it to multiple communities
    • you can upload an image as well and choose between uploading to your Lemmy instance or to Imgur
  • create a recurring post that gets posted at a specific date and time (especially useful for daily/weekly/monthly/end-of-month threads)
  • schedule pinning and unpinning of posts (instance and community)
    • the pinning and unpinning can be specified as part of creating a post
  • the aforementioned notifications about unread posts from a specific community (useful for mods)
    • can be also set using a recurring schedule, so you can get the report daily/weekly/monthly etc.

To learn more, visit the !schedule@lemmings.world community.

P.S. It's open source and can be self-hosted using docker!

10
1

I’d love to host my own Lemmy server but I’m just a script kiddie

11
1
submitted 9 months ago by shootwhatsmyname@lemm.ee to c/lemmydev@lemm.ee
12
1
submitted 9 months ago by silas@programming.dev to c/lemmydev@lemm.ee

Where are you all finding details on what features are included in each version of lemmy-js-client?

13
1
submitted 9 months ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

I hope this is allowed, if not, I'll delete the post, I just wanted to share some stats of my bot because I'm quite excited about them.


 ---------- --------- ----------- ------------------------- ------------------------- ------------------------ 
  Comments   Upvotes   Downvotes   Negative comments count   Positive comments count   Neutral comments count  
 ---------- --------- ----------- ------------------------- ------------------------- ------------------------ 
  2769       13734     426         0                         2769                      0                       
 ---------- --------- ----------- ------------------------- ------------------------- ------------------------

Note that the bots default upvote is not considered for the stats. Positive comments are those where there's more upvotes than downvotes, neutral ones are those where downvotes and upvotes are the same and negative are when the comment has more downvotes than upvotes.

14
1
submitted 9 months ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

I've made an open source tool for scheduling posts to Lemmy, you can find it at https://schedule.lemmings.world. It can be used by users from any instance and it can be self-hosted if you wish so!

Changes since the last time I posted about it:

  • you can now login with 2FA enabled
  • you can schedule pin and unpin of posts in a community if you're the mod
  • you can schedule pin and unpin of posts in an instance if you're the admin
  • when creating a post, you can choose to pin it to the community (if you're a mod)
  • you can choose the language of your posts
  • an official support community has been created at !schedule@lemmings.world
  • you can post the same post into multiple communities easily, just select the communities and multiple scheduled posts will be created

Let me know what you think!

15
1
submitted 9 months ago* (last edited 9 months ago) by fixmycode@feddit.cl to c/lemmydev@lemm.ee

I'm in the process of developing a bot. My intention is to scan all comments regardless of depth in a given community up to a certain date, so it receives only the comments made since the last request. I want to play nice so I'm also trying to do it on the less amount of queries possible.

The community I'm testing this is fairly small, it has 40 comments total, but the problem is that when I request comments without specifying max_depth, and sort ordered by New, I receive only 10 comments, if I try to specify page, or limit, I get an error {"error":"couldnt_get_comments"}.

If I don't specify page or limit, and set an arbitrary number for max_depth, like 4, I get the 40 comments I'm expecting.

My question is: what's the correct way to request comments? My intention is doing something similar to an user pressing "Comments" on front of a community, like calling the community URL with params ?dataType=Comment&amp;page=1&amp;sort=New

16
1
App to schedule posts on Lemmy (schedule.lemmings.world)
submitted 9 months ago* (last edited 9 months ago) by rikudou@lemmings.world to c/lemmydev@lemm.ee

I've made an app that makes it possible to schedule a post in Lemmy at an arbitrary time. It's available at https://schedule.lemmings.world and can be used by people from any instance.

Let me know what you think!

P.S. This post was made from the app!

Edit: And it's open source!

17
1
submitted 9 months ago by FrostySpectacles@lemmy.ml to c/lemmydev@lemm.ee

I have a question about the semantics of child_count in the comment list API endpoint. Sorry for being related to an earlier question but I haven't quite figured it out yet.

My assumption was that child_count would indicate the amount of total descendants of a comment, regardless of depth. But take this case for example:

$ curl 'https://lemmy.ml/api/v3/comment/list?parent_id=2157873&amp;max_depth=999&amp;limit=999' | jq '.comments[]
| { path: .comment.path, id: .comment.id, content: .comment.content, child_count: .counts.child_count }'
{
  "path": "0.2157873",
  "id": 2157873,
  "content": "Really cool! I'm excited to learn more about you and the project!\n\nWhat's the format? Should we submit questions beforehand, or will you process questions that arrive at the start time? I've never participated in an AMA  😅 ",
  "child_count": 9
}
{
  "path": "0.2157873.2158260",
  "id": 2158260,
  "content": "You just post questions as top-level replies to the stickied thread that day, and we'll be online to answer them.",
  "child_count": 6
}
{
  "path": "0.2157873.2158260.2158286",
  "id": 2158286,
  "content": "Cool. Thank you for doing this!",
  "child_count": 1
}
{
  "path": "0.2157873.2158260.2229041",
  "id": 2229041,
  "content": "Post doesn’t mention, where is the AMA? Here or in a different community?",
  "child_count": 3
}
{
  "path": "0.2157873.2158260.2158286.2158743",
  "id": 2158743,
  "content": "No probs!",
  "child_count": 0
}
{
  "path": "0.2157873.2158260.2229041.2231423",
  "id": 2231423,
  "content": "As the post mentions, it will be stickied to the top of lemmy.ml ",
  "child_count": 2
}
{
  "path": "0.2157873.2158260.2229041.2231423.2231737",
  "id": 2231737,
  "content": "Thanks for the details. May be I’m missing something, but I don’t see that detail in the post. ![](https://programming.dev/pictrs/image/82c90859-9cfb-4c00-80d8-7e96bfd96c1c.jpeg)",
  "child_count": 1
}
{
  "path": "0.2157873.2158260.2229041.2231423.2231737.2238347",
  "id": 2238347,
  "content": "Oops my bad, that was something I responded to in a comment.",
  "child_count": 0
}

I see that comment 2157873 has a child count of 9, with one direct descendant (2158260). The descendant has a child count of 6. I'd reason that comment 2157873 has 2 direct descendants that aren't visible in the API response yet, because it has one visible descendant having a child count of 6 (i.e. 9 - 1 - 6 = 2). My calculation seems incorrect because (a) I don't see a 'Load more' indicator for this part of the comment thread on https://lemmy.ml/post/2671212, and (b) every comment shown there also seems present in the API response.

Am I understanding the meaning of child_count correctly?

18
1
submitted 9 months ago by Cr4yfish@lemmy.world to c/lemmydev@lemm.ee

With every new App published on IOS I wonder again how the financing works. Just through donations, or do you "take one for the team"?

19
1
submitted 10 months ago by FrostySpectacles@lemmy.ml to c/lemmydev@lemm.ee

I'm creating an AGPL-licensed Lemmy web UI.

While working on the comment section I wondered: what's the best way to retrieve the total amount of direct descendants of a comment? I'm not talking about child_count as this appears to count descendants at any depth.

My use case is displaying a 'Load X more' button that for a given comment loads any direct descendants that are not yet being displayed.

20
1
submitted 10 months ago* (last edited 10 months ago) by CreatureSurvive@lemmy.world to c/lemmydev@lemm.ee

I’m in the process of submitting my Lemmy client (Arctic) to TestFlight, and I had some concerns about NSFW options in my app.

As per section 1.2 User-Generated Content it states that NSFW content needs to be disabled by default, and can only be enabled through the website.

Apps with user-generated content or services that end up being used primarily for pornographic content, Chatroulette-style experiences, objectification of real people (e.g. “hot-or-not” voting), making physical threats, or bullying do not belong on the App Store and may be removed without notice. If your app includes user-generated content from a web-based service, it may display incidental mature “NSFW” content, provided that the content is hidden by default and only displayed when the user turns it on via your website.

Does this mean that I am not aloud to include any options in my apps interface regarding NSFW content, eg: Blur / Hide NSFW Content, Even if the content is hidden by default?

Any pointers here would be useful. I do see that other Lemmy clients are including options within apps and have not had any issues so far, but the policy seems to indicate this is not allowed.

21
1
submitted 10 months ago* (last edited 10 months ago) by rikudou@lemmings.world to c/lemmydev@lemm.ee

You can find it here. Source code in the link.

22
1
submitted 10 months ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

I've updated the bot and added the possibility of translating hardcoded links (like this one: https://lemmy.world/post/2355178 or this one: https://lemmy.world/comment/1863672) to posts/comments with links from your instance when you mention him. I'll show an example in comments.

23
1
submitted 10 months ago by rikudou@lemmings.world to c/lemmydev@lemm.ee

It now supports 0.18.3 and contrary to previous releases it supports unauthenticated requests where it makes sense.

https://github.com/RikudouSage/LemmyApi/

24
1
submitted 10 months ago* (last edited 10 months ago) by RoundSparrow@lemmy.ml to c/lemmydev@lemm.ee

Someone was asking about it in support, so I was curious to try it. The Rust code has HideCommunity, I even tried to bypass the JavaScript client and do a direct API call.

Does anyone see the function call to send a HideCommunity object?

Where it might be disabled in the Rust code? I know it goes all the way into the database and is on SELECT statements.

Thank you

25
1
submitted 10 months ago by RoundSparrow@lemmy.ml to c/lemmydev@lemm.ee

For lemmy server testing and performance baseline measurement, I think it would be cool to have every API call exercised.

Anyone willing to create and share some JavaScript client code? Normally these are run with Jest via NodeJS - but we can make it an extra step to integrate into Jest. I'm just thinking someone doing front-end app work can do a well organized hit on every API surface.

You can skip the creation of a user if you want, that code is already in the testing

Probably ideal to organize moderator vs non-moderator.

Something like: edit profile with every option one at a time, create a community, edit it, create posts, edit, delete, undelete, reply, etc. Imagine you were doing interactive tests of a major upgrade and wanted to hit every feature and button.

Right now most of that testing is done in independent scripts, such as a user test: https://github.com/LemmyNet/lemmy/blob/main/api_tests/src/user.spec.ts

And you can see it only tests editing a profile is working, not that actual features change their behavior. Although I've started to add that for back-end behaviors like showing read/unread posts on the list. Front-end devs are the ones who know what end-users do and the fringe cases to look out for. Thank you.

view more: next ›

Lemmy App Development

686 readers
12 users here now

A place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform.

On-Topic:

Off-Topic:

founded 11 months ago
MODERATORS