|
MessengerYouLike
|
|
When IMSDK.IMClient.BeginAddFriend request is rejected by the IMClient
public event OnFriendNotAuthorized;
Public Event OnFriendNotAuthorized(ByVal FriendUsername As String, ByVal Message As String)
|
Return Values |
Description |
|
ByVal FriendUsername As String |
Username of Friend |
|
ByVal Message As String |
Message Form friend |
When a sub IMSDK.IMClient.BeginAddFriend is called then on friend side a event IMSDK.IMClient.OnFriendAskingPrimssion is raised if the friend rejects the request by calling the sub IMSDK.IMClient.BeginFriendAuthorizationDenied then this event is fired if there is a message it will be available
[Visual Basic] 'Create a new IMClient Dim MC as new IMSDK.IMClient 'Call the Listen Sub MC.Listen() 'Now Try to login MC.BeginLogin(TxtUsername.Text,TxtPassword.Text) 'if username and password is valid then Private Sub MC_OnLoggedin(ByVal UserObject As IMSDK.User) Handles MC.OnLoggedin Debug.WriteLine("Username logged in : " & MCUser.Username & " , " & MCUser.Password) End Sub 'if username or password is invalid then Private Sub MC_OnUsernameOrPasswordInvalid(ByVal Username As String, ByVal Password As String) Handles MC.OnUsernameOrPasswordInvalid Debug.WriteLine("Username password invalid : " & Username & " , " & Password) End Sub 'Now Add a Friend MC.BeginAddFriend(TxtFriendusername.text, TxtGroupUID.Text, txtMessage.text) 'If Friend Invitation Accepted then Private Sub IMC_OnFriendAuthorized(ByVal FriendUsername As String, ByVal online As Boolean) Handles IMC.OnFriendAuthorized Debug.WriteLine("user : " & FriendUsername & " has authorized you and is online :" & online.ToString) End Sub 'If Friend Invitation Denied then Private Sub IMC_OnFriendNotAuthorized(ByVal FriendUsername As String, ByVal Message As String) Handles IMC.OnFriendNotAuthorized Debug.WriteLine("User : " & FriendUsername & " has denied your invitaion with a message : " & Message) End Sub