this post was submitted on 11 Jul 2023
12 points (92.9% liked)

Lemmy Support

4550 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

Is it possible for Lemmy to send me a notification whenever somebody submits a new post to a specific community (one that I own)?

I started a project-specific community [email protected] that's supposed to be a support forum, and I have missed a few posts for many hours because there are no notifications.

I'd be ok too if there was a simple API and I'd have to write a small script, but it'd be nicer if it was built-in

you are viewing a single comment's thread
view the rest of the comments
[โ€“] WhoRoger 5 points 1 year ago* (last edited 1 year ago) (8 children)

[email protected] has an automod bot, I'm just testing it too. Lemmy.world's api is inconsistent, but maybe that won't be a problem on your instance.

@[email protected] ?

[โ€“] [email protected] 2 points 1 year ago* (last edited 1 year ago) (7 children)

That implies that it's not a native feature. I gotta find the API docs then...

Edit: Looks like there is an easy-ish API. Examples:

$ curl -s "https://discuss.ntfy.sh/api/v3/post/list?sort=Hot"|jq '.posts[].post.name'
"Docker-compose + Traefik"
"[SOLVED] Self-hosted NTFY does not receive all notifications"
"Markdown is coming soon ... ๐Ÿคฉ ๐Ÿ˜ฒ"
"[disscussion] Lemmy push notifications with ntfy"
"Using healthchecks.io and ntfy.sh to wake you up if your services are down"
"Ntfy Connector: Modal-based discord bot to send,and now receive, ntfy notifications."
"Welcome to the new ntfy discussion board"
"ntfy Web Push / PWA support is coming soon"
"๐Ÿ“ข  ntfy Web Push / PWA: Request for testing!"
"ntfy release ๐ŸŽ‰ - Now with Web Push and a progressive web app (hello iOS friends โค๏ธ), and with dark mode for the web app! ntfy lets you send push notifications to your phone via a simple REST API, and"
[โ€“] Rooki 4 points 1 year ago* (last edited 1 year ago) (6 children)

You have to fetch every comment every post every few minutes and save the ids somewhere.

I suggest you ( if you are a js programmer ) https://github.com/SleeplessOne1917/lemmy-bot , it fetches the newest posts, comments and saves it for persistency in a database, so that you dont get every 30 seconds notified.

If you want i can set up the bot for you or just guide you how you could do it :) If you want i can even host the bot on my server.

edit: if you want you can do it over with curl but its difficult because it sends you every post. not unread ones. ( and search sort for "new" for best results )

[โ€“] [email protected] 3 points 1 year ago (1 children)

Thanks dude. I'm going to try the curl route. What do you mean by it sends you every post? Isn't that what I want?

[โ€“] Rooki 3 points 1 year ago (1 children)

Yeah but you would have to know what posts are new and not already known.

[โ€“] [email protected] 3 points 1 year ago (1 children)

That's what saving the IDs is for right? It's easy enough to do in a bash script I think. I'll post it here later, assuming I get it to work.

[โ€“] Rooki 2 points 1 year ago (1 children)

But i would not know how to save the ids there. But good luck :)

[โ€“] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)
[โ€“] Rooki 1 points 11 months ago

Ah ok now i know how to save things in files with bash :)

load more comments (4 replies)
load more comments (4 replies)
load more comments (4 replies)