Currently, when a friend is removed, the corresponding friend invitation is deleted from the database but the notification assigned to that invitation is only marked as deleted and a user can retrieve it. However, it will not have an assigned "actor" because the FriendInvitation is deleted. One solution is that FriendInvitation is be treated as and is only marked as deleted and can be retrieved with the notification. Now, we only work around this and display a message that this notification is invalid.
Currently, when a friend is removed, the corresponding friend invitation is deleted from the database but the notification assigned to that invitation is only marked as deleted and a user can retrieve it. However, it will not have an assigned "actor" because the FriendInvitation is deleted. One solution is that FriendInvitation is be treated as and is only marked as deleted and can be retrieved with the notification. Now, we only work around this and display a message that this notification is invalid.