Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Topic and Board emails to Notifications #3625

Open
Spuds opened this issue Apr 13, 2022 · 9 comments
Open

Move Topic and Board emails to Notifications #3625

Spuds opened this issue Apr 13, 2022 · 9 comments
Assignees
Milestone

Comments

@Spuds
Copy link
Contributor

Spuds commented Apr 13, 2022

The discussion is here: https://www.elkarte.net/community/index.php?topic=6112

There are a few suggestions in there that are quite reasonable. The primary direction would be to consolidate the watched topic and watched boards into notifications which seems like a good idea, If nothing else but to keep all those (mentions, likes, quoted, ... watched) in a single area.

The event manager makes it easy to add them to the ACP and tie into events. It will require to finally explode part of sendNotifications in Notification.subs.php in to its own class so its methods are reusable which I'll work on. One thing that I could really use some help on are an update to the event manager system (and since @emanuele45 is working on that and created it <-- see what I did there !) that adds a queue to the email area of notifications.

Right now when we send a notification is pretty close to obexit which for most notifications (mentions, quoted, liked) is proper and harmless ... but as an enhancement I'd like the ability, for a short grace period of a few mins. This would really be used for watched topics / watched boards, where we currently send out the post notification straight away.

A recent example was the PM you got from Steely, where you posted and deleted, but at that point its been sent via email. Others are posted and you do a quick edit (spelling, forgot a link, forgot something). A simple 3-5 min wait time before sending would clean that up significantly. Notifications has a lot of moving parts so it would be awesome if you could look into adding this. 🙏

@Spuds Spuds added this to the 2.0 milestone Apr 13, 2022
@emanuele45
Copy link
Contributor

That's interesting indeed. And it could actually add also another kind of feature: group bits of notifications, like for example if a post has 3 replies in the time the first is posted, but before the notification is sent, it could group the notifications together instead of firing three consecutive emails?

@emanuele45
Copy link
Contributor

So, right now notifications are kind of generated "on the fly" and sent as soon as possible within the same page load.
Introducing such a delay would mean basically decouple entirely notifications from the flow of the page and have a kind of cron job (wink-wink) that picks up notifications "older than" and sends them up.
If I remember correctly how it works it may just be "as simple as" actually use the mail queue always and for any kind of notification.
That shouldn't be a huge deal I guess... I hope. 😆

@Spuds
Copy link
Contributor Author

Spuds commented Apr 13, 2022

nods I was thinking that using a queue, along the lines of the mail queue, for items that we want to delay.

From what I've looked at they (notification/mentions) happen in concert with posting, so immediate which is the action we want for most types (plus it as close to zero overhead as you can get which is awesome!). But it would be a treat to simply log the event in a queue for a delayed processing, which implies moar overhead since, in the case of a watched topic, we would have to re-fetch the topic.

The mail queue actually builds out the message and just delays sending it until its time is up ... here we want to delay the entire process which means by the time the event re-triggers any edits or deletes, will have been completed.

@emanuele45
Copy link
Contributor

For the record @Spuds today my (former?) "main" computer decided to stop working (I suspect the power supply, but I'm still investigating), so... well, I'm stuck, I don't even have access to emails right now because I don't remember the passwords. 😅 I managed to log into github because... well, let's say that if I didn't enable 2fa I should change password.
If I'm lucky in a couple of days I may find a friend with a power supply to borrow me and confirm the issue. Otherwise I'll buy a NAS and that's it 😹

@Spuds
Copy link
Contributor Author

Spuds commented Apr 14, 2022

Lets hope its the PS then and not some .01 cent capacitor that crapped out!

I run a NAS here, actually (2) of them LOL. One is my main one (an old Dell server that I got from ebay), holds all my git repos, photos, video, music, pdf, etc are on as well as all my docker containers.
I use a cheap Dlink NAS to backup the files from the main NAS (even though its ZFS and robust, I'd hate to start over due to some whatever happening).
Past that I just have a couple of older desktop/laptops that I use, although the software is still on those unless I can run it in a container.
Anyway its a vast sea of nerd-vana if you get a NAS!

@emanuele45
Copy link
Contributor

Yeah, confirmed: a capacitor of the PS. I didn't notice it at first, but on a second look after confirming the rest is working it was fairly obvious that the top is no longer flat. 😆
Now I just have to get a new one.

@Spuds
Copy link
Contributor Author

Spuds commented Apr 17, 2022

They puff when you cook them 💥

@emanuele45
Copy link
Contributor

Back!
Now I just have to catch up on almost a month of not checking almost anything 😆

@Spuds
Copy link
Contributor Author

Spuds commented Apr 13, 2024

Some of this was addressed here: #3784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants