Feature #5264
Allow global chat only with friends
Description
We have reviewed the global chat here, and came to the conclusion that it would be a mistake to let everyone chat with anyone else (even on Facebook, they don't allow that). Specially for girls (there's a lot of web harrassment)
Furthermore, if you are connected on the chat and don't want to be bothered by someone, there is no way to stop the chat box to appear every time.
Global chat must be restricted to your friends only.
Saldy, this implies having several screens updated (all the people contact screens where the "Chat" green button appears should be filtered and it should only appear for friends.
Associated revisions
Only allow friends to chat see #5264
History
Updated by Yannick Warnier over 8 years ago
- Status changed from New to Assigned
- Assignee set to Julio Montoya
- % Done changed from 0 to 50
I updated the show_social_menu() function in social.lib.php to add a check on the $show_full_profile parameter, which is made of a check to see if the user is a friend.
//@todo check if user is online and if it's a friend to show the chat link if (api_get_setting('allow_global_chat') == 'true' && $show_full_profile) { if ($user_id != api_get_user_id()) { $user_name = $user_info['complete_name']; $options = array('onclick' => "javascript:chatWith('".$user_id."', '".Security::remove_XSS($user_name)."', '".$user_info['user_is_online_in_chat']."')"); ...
Julio, do you think that's enough?
As far as I can see, we should also prevent the chat box to be called directly via javascript (chatWith()), but this could wait for 1.9.2 if unreasonnably complicated.
Updated by Julio Montoya over 8 years ago
That fix doesn't take into account that their are friends ... checking too
Yannick Warnier wrote:
I updated the show_social_menu() function in social.lib.php to add a check on the $show_full_profile parameter, which is made of a check to see if the user is a friend.
[...]
Julio, do you think that's enough?
As far as I can see, we should also prevent the chat box to be called directly via javascript (chatWith()), but this could wait for 1.9.2 if unreasonnably complicated.
Updated by Julio Montoya over 8 years ago
- Status changed from Assigned to Needs testing
- Assignee deleted (
Julio Montoya) - % Done changed from 50 to 80
I just sent a fix
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs testing to Feature implemented
- Assignee set to Julio Montoya
Good for me
Updated by Julio Montoya over 8 years ago
The chat link in the friend profile will be on only available if I'm online.
First mod to avoid users contacting non-friends through chat - refs #5264