When a player uses the "block" feature on another user's profile to prevent that user from sending a private message to the player, the user is still able to invite the player to a party or guild. This is undesirable because blocking a user from sending you PMs should prevent all contact from that user.
This is the PM block feature that I'm referring to (see the icon at the bottom with the "Block" on-hover text):

This looks to be where the API level code is that controls that notification: https://github.com/HabitRPG/habitica/blob/develop/website/server/controllers/api-v3/members.js#L309-L316
I'd love to take a look, but if anyone beats me to it I won't be offended 馃槃
@Alys ^ PR submitted for a fix!
Currently, a user who has been PM-blocked can still invite the blocking user to a party or guild. Blocking user will not see notifications in Habitica but will still receive the email invitation. Blocking user also will still show as an invited user in the guild member list under "Invites" tab. This should not happen.
On the blocked user side, the invitation should appear like it goes through, but the invitation should not actually go through. This prevents email from being sent and the blocking user will not show up in the guild's invited members list.
Suggestion is to expand functionality from here: https://github.com/HabitRPG/habitica/pull/8755