1
1
submitted 8 months ago* (last edited 8 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/

2
1
submitted 8 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.

3
1
submitted 9 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?

4
1
submitted 10 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?

5
1
submitted 10 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?

6
1
submitted 1 year 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 :)

7
1
submitted 1 year 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!

8
1

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

9
1
10
1
submitted 1 year 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?

11
1
submitted 1 year 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.

12
1
submitted 1 year 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!

13
1
submitted 1 year ago* (last edited 1 year 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&page=1&sort=New

14
1
App to schedule posts on Lemmy (schedule.lemmings.world)
submitted 1 year ago* (last edited 1 year 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!

15
1

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&max_depth=999&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?

16
1
submitted 1 year 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"?

17
1

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.

18
1
submitted 1 year ago* (last edited 1 year 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.

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

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

20
1
submitted 1 year 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.

21
1
submitted 1 year 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/

22
1
submitted 1 year ago by CMahaff@lemmy.world to c/lemmydev@lemm.ee

You will want to change your Cargo.toml to point to the Lemmy Github repository + either a specific tag or branch for the version you want to target.

See the examples here: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories

23
1
submitted 1 year ago* (last edited 1 year ago) by silas@programming.dev to c/lemmydev@lemm.ee

I'm getting a "user_already_exists" error from /user/save_user_settings no matter what settings I try to change. The JWT is valid, and this is happening on multiple instances the same (programming.dev, lemm.ee, etc.) Anyone have any ideas why I'd be getting this? Here's my payload:

{
  show_bot_accounts: true,
  auth: token
}

Edit: This issue describes a bug where this happens when the avatar field is not included. Just tested it and that's the same problem I'm running into. I fixed it temporarily by passing the current avatar url.

24
1
submitted 1 year ago by manucode@infosec.pub to c/lemmydev@lemm.ee

I'm not 100% sure if this is the right community for my question. Should that be the case, I want to apologize.

Alternative to mega-threads: Could this feature be implemented by a Lemmy instance?

Basically, my idea is to allow community mods to quarantine posts into groups called super-threads. These super-threads would show up in the community appearing like regular post. But when you open such a super-thread, you would see an overview over all the posts quarantined to this super-thread. It would look similar to a community. Quarantined posts could still be found by a search but they wouldn't show up in the community overview or the general feed. Only the super-threads themselves would show up there. That way, mods could stop a single topic from overwhelming a community by quarantining all related posts to one super-thread. Thereby, super-threads could replace existing mega-threads while maintaining the forum-like form of Lemmy.

25
1
submitted 1 year ago by blawsybogsy@lemmy.ml to c/lemmydev@lemm.ee

Is there anywhere that lemmy's various types of internal links are documented? like !community links @user links, links of the form https://lemmy.com/c/community@otherinstance.net. i have also seen links that just have "/c/community@otherinstance.net"... at the moment i'm only developing rendering code for them as i happen upon them, which is ad-hoc

view more: next ›

Lemmy App Development

644 readers
24 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 1 year ago
MODERATORS