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

Ability to unsubscribe / manage notifications #6

Closed
joolswills opened this issue Oct 12, 2016 · 4 comments
Closed

Ability to unsubscribe / manage notifications #6

joolswills opened this issue Oct 12, 2016 · 4 comments

Comments

@joolswills
Copy link

I have a couple of problems with this extension, and wondered if there is a way to fix. Am using nodebb 1.2.1 on mongodb.

  1. Some deleted accounts which had subscribed to some categories. This causes lots of warn: uid : 861 has no email, not sending. to be logged
  2. A banned user with invalid email causing bounces from the category notifications

For the 2nd issue, if there was an ability in nodebb to assume the identity of a user, I would be able to do that then "unsubscribe". I don't think this exists though ? For the 1st issue I guess only manually editing the database can sort it - and I assume this could be a bug as deleted users should have their subscriptions deleted also?

Any guidance with this would be appreciated - the ability to be able to manage the subscriptions would help for example.

@joolswills
Copy link
Author

joolswills commented Oct 12, 2016

Also if a user is banned, perhaps it would be good to exclude them from the category notifications ? (Which would also handle case 2 where a user is banned for using a throw away / invalid email address)

@joolswills
Copy link
Author

I'm running against mongodb - do you have a way I can manually clear the category notifications for users that no longer exist ?

22/12 19:46:53 [32470] - ESC[33mwarnESC[39m: uid : 986 has no email, not sending.
22/12 19:46:53 [32470] - ESC[33mwarnESC[39m: uid : 4333 has no email, not sending.
22/12 19:46:53 [32470] - ESC[33mwarnESC[39m: uid : 861 has no email, not sending.
22/12 19:46:53 [32470] - ESC[33mwarnESC[39m: uid : 1062 has no email, not sending.
22/12 19:46:53 [32470] - ESC[33mwarnESC[39m: uid : 4286 has no email, not sending.
22/12 20:00:21 [32494] - ESC[33mwarnESC[39m: uid : 3439 has no email, not sending.
22/12 20:00:21 [32494] - ESC[33mwarnESC[39m: uid : 1462 has no email, not sending.
22/12 20:00:21 [32494] - ESC[33mwarnESC[39m: uid : 4807 has no email, not sending.
22/12 20:00:49 [32494] - ESC[33mwarnESC[39m: uid : 3439 has no email, not sending.
22/12 20:00:49 [32494] - ESC[33mwarnESC[39m: uid : 1462 has no email, not sending.
22/12 20:00:49 [32494] - ESC[33mwarnESC[39m: uid : 4807 has no email, not sending.
22/12 20:03:07 [32496] - ESC[33mwarnESC[39m: uid : 1462 has no email, not sending.
22/12 20:03:07 [32496] - ESC[33mwarnESC[39m: uid : 4807 has no email, not sending.
22/12 20:03:07 [32496] - ESC[33mwarnESC[39m: uid : 3439 has no email, not sending.

@barisusakli
Copy link
Member

You need to get all the categories first and then run the following queries for uid 986
Assuming your category ids are [1,2,3]

db.sortedSetRemove('cid:1:subscribed:uids', 986);
db.sortedSetRemove('cid:2:subscribed:uids', 986);
db.sortedSetRemove('cid:3:subscribed:uids', 986);

Repeat for the other uids as necessary. I updated the plugin so when a user is deleted they will be removed automatically.

@joolswills
Copy link
Author

thanks!

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

No branches or pull requests

2 participants