This would be really helpful, as people would be able to stop a conversation if someone is being really annoying, especially if they get one email per message.
Just a simple button like for favorites, to block/unblock an user, directly in messages and or on the user page, next to the message icon.
Ok, well I wouldn’t be against a paid plugin for managing blocking/unblocking user, it would be very similar to the favorite plugin, without any new pages to render, just an icon and block/unblock in the message (if the message plugin is installed).
In the meantime, I will have to write something, I think I’ll just do as you did with favorites and messages: adding blocked users in the comment table, with comment_post_ID as the blocked_user_id, comment_type as hp_blocked, and user_id as current_user_id . I guess it won’t break anything adding a new comment_type?
Then if I get results from the database, I show ‘unblock user’, else 'block user".
And activate Block and unblock button using some jquery and a single php page that would insert or delete the line using wp_insert_comment(), with some conditions to prevent people accessing the page without permission.
It won’t be as clean as what you did, but I guess this should work. I didn’t get my head into coding for a while. Wish me luck.
Sure, if you use a separate comment meta field for storing the blocked user ID it should be ok. You can use the Development forum here if you need some general guidance. Good luck