Ticket #142 (new enhancement)
Private chats should not open automagically
|Reported by:||melo||Owned by:|
|Component:||Multi-User Chat||Version:||version 0.8|
Inside a chat room, we can chat one-to-one with a participant, even if the participant JID is unknown.
The MUC acts as a intermediary.
The problem is that the private chat window pop's up without any request for confirmation, so it is a source of spam.
When a private message arrives we should display a pop window explaining "User X at Chat-room Y (real JID if known)" want to talk to you privately".
The following options should be available:
- accept, the default: we accept this private chat;
- refuse: we refuse the private chat, and send back a message saying so.
- block: we block the user from opening private chats. No message is sent to the other user. Further attempts from the same user (see below) will not even display the pop up;
- always accept: we accept this private chat, and future private chats from the same user (see below) will be accepted.
All decisions that require long term storage (block and always accept for now) should use local storage in the initial version. Future versions might push this to the network.
For those two options to work (block and accept always), we need to identify the user. There are two situations:
- the chat-room is public and we have the real JID of the client: in this case the ban or acceptance uses this JID;
- we don't know the real JID of the client: in this case we should use the JID the user is using in the chatroom.
In the second case, there are some extra rules. Given that this JID is temporary, the accept forever or block action is only temporary also.
If any of these things happens, we need to react:
- if we leave the room, all temporary blocks/accepts should be cleared;
- if one of our blocked/accepted always users leaves the room, we should clear the entry;
- if one of our blocked/accepted always users changes the nick inside the room, we should update the entry to use the new JID.
There is already a "Gag list" in the chat room participants context menu. The gagged users should be part of the block list, but not the other way around: if we gag a user, he cannot open a private chat session with us, but if we block a private session with a contact, we should not gag him.