Friends are coming
Hurrah, upvotes and comments are functional! Next stop are the friendlists which may be a bit more work to get right but just like any other system, I just keep it very simple for now.
One thing that was a bit tricky, is that I want to allow to send an email when somebody follows you (you can switch this on/off), but if they unfollow and follow back again, it should send a message. I was thinking about setting up a separate db table for this, but for now I just have a "isDeleted" field. If you follow a user, and the record is present (but set to isDeleted), we don't send an email, and we just set the isDeleted back to false again. There are probably better ways to deal with this though... Most of this is abstracted away, so if I want to change this again later to a more efficient system, it should be no problem.
|March 24, 2023