pingvin-share icon indicating copy to clipboard operation
pingvin-share copied to clipboard

🚀 Feature: Notifications (webhook?)

Open Hukuma1 opened this issue 2 years ago • 15 comments

🔖 Feature description

The ability to send a notification of certain events. On link open, maybe on download of a file, view, etc. Apprise is the gold-standard since it houses basically any notification system you could possibly have/run/want. FOSS as well. https://github.com/caronc/apprise

🎤 Pitch

When X share is opened and/or downloaded, I could receive a notification to my Home Assistant which in turn sends me a push notification to my iPhone. Or you might want a message in Discord sent to you. Or Telegram. Endless possibilities. Apprise also has e-mail notifications so in theory could simplify the current e-mail notification code? (not sure)

Hukuma1 avatar Jan 26 '23 20:01 Hukuma1

Nice idea but Apprise hasn't a package for node.js, has it? The backend is written in typescript so we would have to create a micro service only for Apprise and that's in my opinion too much work only for notifications.

Or did I miss something?

stonith404 avatar Jan 31 '23 10:01 stonith404

Yes, currently there is no stable nodejs package available. I think this could work, but it may take more work than you would like to use in developing a feature.

sebastian-b1 avatar Jan 31 '23 13:01 sebastian-b1

Yeah, apologies in advance. I wasn't sure what underlying technologies both use and wasn't aware they were incompatible.

Is it possible to just implement Webhooks? Would that be a much smaller ask? Seems most other services (e.g. Telegram, Home Assistant) would still have support for receiving Webhooks.

Hukuma1 avatar Jan 31 '23 18:01 Hukuma1

Yeah webhooks would be easier to implement I think. Which events should trigger the webhook?

stonith404 avatar Jan 31 '23 20:01 stonith404

@Hukuma1 Just to understand, would you mind to share why you think it would be nice that you can get notifications in e.g Telegram or Discord? Do you have a specific use case?

stonith404 avatar Jan 31 '23 20:01 stonith404

Oh I just grabbed a popular chat program as an example where to send a notification (channel/DM). For my personal use case I would just like to get a push notification to my phone that someone interacted with my share. Since I already use Home Assistant it can be received by a webhook implementation. I just suggested other services to not only make it about my use case. :P

There's a few core events I would say: open and download. Separate, in case someone only clicked the link but didn't actually download? (not sure if each file in the share needs its own event, that's your call)

Future/bonus: If a share is about to expire, can send an alert? New file uploaded alert to your reverse share? Bad password/failed login alert? (notify you of someone trying to crack into your private share)

Hukuma1 avatar Jan 31 '23 20:01 Hukuma1

@Hukuma1 Okay, thanks for your explanation. I'm looking into it, but currently I want to prioritize other issues if someone can't wait for this feature, feel free to create a PR :)

stonith404 avatar Feb 01 '23 22:02 stonith404

Absolutely! No rush. Keep up the great work!

Hukuma1 avatar Feb 01 '23 23:02 Hukuma1

+1 for webhook implementation

Zixim avatar Aug 25 '23 16:08 Zixim

Could you guys suggest me a list of events that would be nice to have for webhooks? E.g share.create

stonith404 avatar Aug 28 '23 08:08 stonith404

when a file is uploaded or downloaded or deleted to/from a (reverse)share. Basically all events related to file movements. For me, the file upload to any reverse share would be the most interesting one to have.

Zixim avatar Aug 28 '23 10:08 Zixim

share.view = entered share but did not download anything share.download = downloaded share.accessfail = failed pw login (maybe can be invoked if failed X amount of times, eg 3 wrong password attempts)

Hukuma1 avatar Aug 30 '23 18:08 Hukuma1

@stonith404

Could you guys suggest me a list of events that would be nice to have for webhooks? E.g share.create

+1 For some sort of notification service, at best ntfy.sh integration.

For me the following things would be nice:

  • share viewed
  • share downloaded
  • share uploaded
  • successful login (with IP)
  • failed login (with IP)

Greetings from Switzerland :)

CrazyWolf13 avatar May 01 '24 16:05 CrazyWolf13

+1

maurxce avatar May 14 '24 09:05 maurxce