habitica
habitica copied to clipboard
prevent typing a private message to a player who has deleted their account
This is similar to https://github.com/HabitRPG/habitica/issues/9247 ("prevent typing a private message to a player who has blocked you / opted out of PMs") and the same code might be usable for both.
On the Messages screen, when the player that you're trying to send a message to has deleted their account, then there should be no "send" button or new message field at the bottom of the screen. Instead, there should be a statement that you can't message that person because they have deleted their Habitica account (you'll need to create a new string for this and it should be placed in
the groups.json
locales file, directly underneat the notAuthorizedToSendMessageToThisUser
string to keep them both together).
Unlike https://github.com/HabitRPG/habitica/issues/9247 , there should be no special treatment for mods.
For a description of why this change is needed, here's a bug reportt from CakeKnight (d8fc8d8b-a10f-416a-b089-587db2af9e4d):
"In User icon > Messages I tried to reply to an old conversation with another user and got an error saying the user was not found. The user's avatar is not loading, there are a few errors in the console, also when trying to click on the user's name or avatar to see their profile, but from what I see in the error message I'm pretty sure the user actually deleted their account. [I confirmed that they had] Also, it looks it's possible to send more messages to the deleted user, but after a refresh they're gone. It looks like a simple network error so for the average Habitican it will be difficult to understand what's going on, on the other hand a "this user deleted their account" would be pretty sad..."
I agree that the deleted message would be sad but I think it's worth explaining to the user exactly why they can't message the user any more, or see their profile or avatar.
Note
Some work towards fixing this issue was already made in https://github.com/HabitRPG/habitica/pull/10878 and can be used as a starting point.
I've updated the labels on this ticket.
Can I take this?
We have updated designs on how to handle this usecase.
(Ghosts not included. 👻)
Is this still available? I'm looking to get into open source contributions, but am relatively new to the programming world. Would love to learn through this.
@reisturm it's still available but it's probably not the easiest issue to start with to be honest, maybe you can try this after https://github.com/HabitRPG/habitica/issues/10992?