Problem authorizing contact in ICQ

I am having trouble getting my bought to automatically authorize new contacts. Here is the code that i am using

Presence accept = new Presence(Presence.Type.subscribed);

accept.setFrom(msg.getTo());

accept.setTo(msg.getFrom());

bot.sendPacket(accept);

Unfortunately, nothing happens, and if I login with the bot’s icq account into ICQ client, the new user is listed in the “not in contact list” category.

Any ideas?

Thanks!

Apparently I also had to send a “subscribe” packet as well:

Presence add = new Presence(Presence.Type.subscribe);

add.setFrom(msg.getTo());

add.setTo(msg.getFrom());

bot.sendPacket(packet);