the contacts added by roster exchange from an external component should be authorized without user confirmation
We have to check if the roster exchange request comes from an external component to avoid illegal use of the roster exchange.
We have to block the “This user wants to change your roster” popup when the request comes from a transport
We have to hide the external components contact in the main roster
To achieve all the above we have 2 ways :
1) Use a function similar to line 2876 of psiaccount.cpp
2) When a new external component is added to the roster automatically add it to the "Transports" Group. External components provide exactly the same functions of a Transport.
Solution 2) should be better/simpler to adopt
How to test this?
You can add a test skype or QQ account with 4 or 5 contacts. Right now you will see one request to authorize/decline each contact while contacts should be added automatically without any confirmation
Adding it to the transports group doesn't help remove the popups (just tested)
Is there a possibility to do that on the server side so that client thinks it is a transport?
Unfortunately not. In case of external component there is no <Group> definition.
I was hoping that adding the external component JID to the Transports group would fix it since in the code it seems that we just check the Group but maybe there is something else.
We should than use a function similar to line 2876 of psiaccount.cpp: in case the JID is transportname.jabbin.com don't show any popup and automatically add the contacts