Mods can laugh at my post while I can't see it
-
I'm still getting upvote notification on my post, even though the thread it belongs to has been moved to a category I have no access to. That seems to make very little sense to me.
-
@Maciejasjmj said in Mods can laugh at my post while I can't see it:
the thread it belongs to has been moved to a category I have no access to
It hasn't, actually, it's just deleted because it's spam. I didn't notice before I upvoted, sorry.
Incidentally, that's why you should flag spam, not reply to it.
-
@Yamikuronue said in Mods can laugh at my post while I can't see it:
flag spam, not reply to it.
Why not both?
What is the fun of it otherwise?
-
@Yamikuronue said in Mods can laugh at my post while I can't see it:
@Maciejasjmj said in Mods can laugh at my post while I can't see it:
the thread it belongs to has been moved to a category I have no access to
It hasn't, actually, it's just deleted because it's spam. I didn't notice before I upvoted, sorry.
Incidentally, that's why you should flag spam, not reply to it.
Good thing @fbmac isn't a mod!
-
@Yamikuronue said in Mods can laugh at my post while I can't see it:
Incidentally, that's why you should flag spam, not reply to it.
I did do both. To be fair, though, some spam evolves into pretty hilarious threads (like the lawyer one).
Not that I mind the upvote, it's just a bit silly that I still have a notification for it directing me straight to an "Access denied" page. Hence why it's in Bugs and not that secret forum where we complain about our moderators.
-
@Yamikuronue said in Mods can laugh at my post while I can't see it:
@Maciejasjmj said in Mods can laugh at my post while I can't see it:
the thread it belongs to has been moved to a category I have no access to
It hasn't, actually, it's just deleted because it's spam.
So I'm inferring that deleted posts get some field set that marks it deleted, instead of actually removing the post (and saving into a history table)?
That....
That just....
-
Filed Under: You are welcome
-
@djls45 said in Mods can laugh at my post while I can't see it:
@Yamikuronue said in Mods can laugh at my post while I can't see it:
@Maciejasjmj said in Mods can laugh at my post while I can't see it:
the thread it belongs to has been moved to a category I have no access to
It hasn't, actually, it's just deleted because it's spam.
So I'm inferring that deleted posts get some field set that marks it deleted, instead of actually removing the post (and saving into a history table)?
That....
That just....Once something is deleted, there's a "purge" option that actually removes the data from the database.
-
@djls45 said in Mods can laugh at my post while I can't see it:
That just....
Is how you do it in real situations, where you might want to reverse a deletion occasionally.
-
@dkf said in Mods can laugh at my post while I can't see it:
@djls45 said in Mods can laugh at my post while I can't see it:
That just....
Is how you do it in real situations, where you might want to reverse a deletion occasionally.
Ok, I guess I can see that, if you don't have a separate history table. But the notification system should check that "deleted" field before sending a notification.
-
@djls45 The post isn't deleted. The thread is.
-
@Yamikuronue said in Mods can laugh at my post while I can't see it:
@djls45 The post isn't deleted. The thread is.
And the fact that there's a difference.....
I mean, deleting a thread should delete all the posts in the thread, right?
But deleting a post, even if it's the first one in the thread, should delete just that post.
-
@Maciejasjmj said in Mods can laugh at my post while I can't see it:
I did do both. To be fair, though, some spam evolves into pretty hilarious threads (like the lawyer one).
Yeah, I figured that in this case, since it was only you who replied I might as well just delete the whole thing.
-
@djls45 said in Mods can laugh at my post while I can't see it:
I mean, deleting a thread should delete all the posts in the thread, right?
Eh...maayyyybe. What if you accidentally delete a thread (or change your mind)? Now you have to also go back and undelete everything? But what if @fbmac posted in the thread?
No, I think it's easier to just show the thread or not but not delete all of the posts.
-
isPostVisible(post) { return <...> && !post.deleted && !post.thread.deleted; }
That's pseudo-code, you
-
@djls45 said in Mods can laugh at my post while I can't see it:
I mean, deleting a thread should delete all the posts in the thread, right?
No... actually, deleting a thread does not delete any of the posts in it. And vice versa (deleting the first post does not delete the thread).
...that said, you're right: it's silly for the system to send you notifications about a post that you can't view.
-
Option 1: add "deleted" column in posts table code will by default treat deleted posts the same as normal posts
Option 2: move deleted posts to a separate table code will by default not see deleted posts
Table seems like a better choice to me
-
@anonymous234 said in Mods can laugh at my post while I can't see it:
Table seems like a better choice to me
Tables?! We don't need no steenkin' tables! We're NoSQL here! Because we're webscale, baby!
-
I'm not going to spill my spaghetti because a similar thing happened in a lounge thread 6+ months ago and this is triggering...
I'm not going to spill my spaghetti because a similar thing happened in a lounge thread 6+ months ago and this is triggering...
-
@anonymous234 said in Mods can laugh at my post while I can't see it:
Table seems like a better choice to me
create view posts_visible as select * from posts where deleted=0 or current_user_is_mod()
-
@Luhmann said in Mods can laugh at my post while I can't see it:
What is the fun of it otherwise?
-
@El_Heffe
Shame
-
@anonymous234 said in Mods can laugh at my post while I can't see it:
Option 1: add "deleted" column in posts table code will by default treat deleted posts the same as normal posts
Option 2: move deleted posts to a separate table code will by default not see deleted posts
Table seems like a better choice to me
Then the code to show the deleted posts to users with permissions to view them gets unnecessarily complicated.
-
@anotherusername said in Mods can laugh at my post while I can't see it:
@anonymous234 said in Mods can laugh at my post while I can't see it:
Option 1: add "deleted" column in posts table code will by default treat deleted posts the same as normal posts
Option 2: move deleted posts to a separate table code will by default not see deleted posts
Table seems like a better choice to me
Then the code to show the deleted posts to users with permissions to view them gets unnecessarily complicated.
How the hell would you do foreign keys for a post that may or may not be deleted in reply to another post that may or may not be deleted inside a topic that may or may not be deleted?
-
@ben_lubar said in Mods can laugh at my post while I can't see it:
How the hell would you do foreign keys for a post that may or may not be deleted in reply to another post that may or may not be deleted inside a topic that may or may not be deleted?
Not easily, which means a Modern Software Designer will do it:
- Not at all
- In the stupidest way possible
-
@ben_lubar remind me again how foreign keys work in MongoDB?
-
@Arantor said in Mods can laugh at my post while I can't see it:
@ben_lubar remind me again how foreign keys work in MongoDB?
I thought for the purposes of this topic we were assuming sane software design.
-
@ben_lubar we left that the minute someone talked about putting parts of the data from one domain in another domain for fairly arbitrary reasons as far as the data is concerned.
This has been tried before in less destructive ways, and it wasn't pretty. SMF sort of does this, if you delete a topic, it is moved to another area called the recycling board, with a reference to which board it came from (which never ever goes wrong), and if you delete a post, it creates a new topic (or reuses a topic if there's already a topic created by deleting other posts from the same topic) in said board again with references back.
While this effectively solves the issue above, it makes finding deleted posts a nightmare, precludes any "this post was deleted" context and generally ends up being a huge board with all the issues this can bring.
Would not do again.
-
Ok, the notification for upvotes is sent by this function: https://github.com/NodeBB/NodeBB/blob/v1.4.0/src/socket.io/helpers.js#L80-L127
The only permission checked is whether the post's author can read the category the post is in: https://github.com/NodeBB/NodeBB/blob/v1.4.0/src/privileges/posts.js#L61-L69
-
@Arantor said in Mods can laugh at my post while I can't see it:
remind me again how foreign keys work in MongoDB?
They're just like domestic keys, but with a funny accent and their own food shops.
-
@PleegWat said in Mods can laugh at my post while I can't see it:
@anonymous234 said in Mods can laugh at my post while I can't see it:
Table seems like a better choice to me
create view posts_visible as select * from posts where deleted=0 or current_user_is_mod()
You also need to include deleted posts by the current user so that they have the option to restore their own posts.
-
@El_Heffe said in Mods can laugh at my post while I can't see it:
@Luhmann said in Mods can laugh at my post while I can't see it:
What is the fun of it otherwise?
I hear you can still find it on certain black market classifieds systems, but the feds have been cracking down on those.
-
@Arantor said in Mods can laugh at my post while I can't see it:
@ben_lubar remind me again how foreign keys work in MongoDB?
At the software level, IIRC. Foreign keys are relational, and mongo is not. Therefore, foreign keys are a foreign concept to it.
-
@anotherusername said in Mods can laugh at my post while I can't see it:
@Arantor said in Mods can laugh at my post while I can't see it:
@ben_lubar remind me again how foreign keys work in MongoDB?
At the software level, IIRC. Foreign keys are relational, and mongo is not. Therefore, foreign keys are a foreign concept to it.
Mind = Blown