I must agree with speedy, that your way of implementing a new thing is confusing. Like throwing random stuff at it and hoping it will work.
No, it doesn't have to be Spark. The thing is that different clients do things differently (the GUI part). Some want you to specify full username of a buddy. Like in Pidgin you have to specify user@server when adding a buddy. Spark just assumes you are searching on the server your user is on and adds the server part automatically (though it might be a user on another server, that's why Pidgin is waiting for a full username). Some clients, like Xabber, provide a hint when adding a contact (grayed out "user@domain.name" in the field).