Project

General

Profile

Feature #5264

Allow global chat only with friends

Added by Yannick Warnier about 7 years ago. Updated about 7 years ago.

Status:
Feature implemented
Priority:
Urgent
Assignee:
Category:
-
Target version:
Start date:
27/07/2012
Due date:
% Done:

80%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

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

Revision 0e253e2c (diff)
Added by Yannick Warnier about 7 years ago

First mod to avoid users contacting non-friends through chat - refs #5264

Revision 3fb5d2fe (diff)
Added by Julio Montoya about 7 years ago

Only allow friends to chat see #5264

History

#1

Updated by Yannick Warnier about 7 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.

#2

Updated by Julio Montoya about 7 years ago

chat.ajax.php should be fixed too, checking ...

#3

Updated by Julio Montoya about 7 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.

#4

Updated by Julio Montoya about 7 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Julio Montoya)
  • % Done changed from 50 to 80

I just sent a fix

#5

Updated by Yannick Warnier about 7 years ago

  • Status changed from Needs testing to Feature implemented
  • Assignee set to Julio Montoya

Good for me

#6

Updated by Julio Montoya about 7 years ago

The chat link in the friend profile will be on only available if I'm online.

Also available in: Atom PDF