Marco
Marco

Reputation: 57573

Skype invitation message

I want to invite a user sending a specific message, but I can't find where I can set invitation message.

This is a (simplified) sample of what I do:

skype.Client.Start(true, true);
var user = skype.SearchForUsers("the_name_i_am_searching_for")
    .Cast<User>()
    .FirstOrDefault();
if (user != null)
    user.BuddyStatus = TBuddyStatus.budPendingAuthorization;

With this code default invitation is sent.

Upvotes: 9

Views: 1457

Answers (2)

Grin
Grin

Reputation: 6662

Try to use Property array instead of a simple assignment. Change

user.BuddyStatus = TBuddyStatus.budPendingAuthorization;

to

skype.Property["USER", "the_name_i_am_searching_for", "BUDDYSTATUS"] = 
    string.Format("{0} {1}", (int)TBuddyStatus.budPendingAuthorization, 
                             "your welcome message")

I failed to find any official docs, but this lib was very helpful. Notice SetBuddyStatusPendingAuthorization method

Upvotes: 9

Pandrei
Pandrei

Reputation: 4951

The skype API offers a function skype.SendMessage(<username>, <string>) which I think is what you are looking for.

Upvotes: 1

Related Questions