Comments (1)
I have made a hackish solution for notification mails even if user has not read the post.
User will receive mails for all replies on post even if post is not read if "Lurk" has been chosen for the tag.
I include a patch file if somebody else is interested:
obsess.txt
To run the patch file:
- Have this extension installed
- Go to root flarum directory
- Run:
patch -p0 <obsess.txt
What is changed is the sql that searches for users in file: SendNotificationWhenReplyIsPosted.php
on line: 62-74
The replacement sql is:
$notify = User::select('users.*')
->where('users.id', '!=', $this->post->user_id)
->join('tag_user', 'tag_user.user_id', '=', 'users.id')
->whereIn('tag_user.tag_id', $tagIds->all())
->whereIn('tag_user.subscription', ['lurk'])
->get()
->reject(function (User $user) use ($tags) {
return $tags->map->stateFor($user)->map->subscription->contains('ignore')
|| !$this->post->isVisibleTo($user);
});
It starts on this line:
https://github.com/FriendsOfFlarum/follow-tags/blob/master/src/Jobs/SendNotificationWhenReplyIsPosted.php#L62
As I am not a php developer I will not be able create a full change for this feature and add a merge request.
Hope this could be useful to somebody else.
from follow-tags.
Related Issues (20)
- Global Follow HOT 3
- Inline Display Problem HOT 2
- Incompatible with FoF Filter HOT 3
- Enabling the extension breaks the full version of the website HOT 6
- Performance issue with tag subscription state HOT 5
- Hidden tag filter not working HOT 5
- When enabling: Uncaught TypeError: Vnodes must either always have keys or never have keys HOT 2
- [Feature request] Ability to follow a tag by default HOT 2
- Ability to add and modify options in the FollowingPageFilterDropdown
- Restore Combined Index View
- Testing Kanban Automation
- Feature Request: invitation to follow promoted tags when reading posts
- Mobile tag follow dropdown z-index too low HOT 2
- Additional languages HOT 1
- Follow button overlaps with the navbar in mobile view
- Body css error on web browser max-width: 768px HOT 1
- [Bug] Wrong/No Email Notifications sent
- Notification of re-tagged discussions
- Mail Message ID Domain is incorrect HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from follow-tags.