TsgcWSPClient_Presence › Events › OnChannelInvitationResponse
Fires on the inviter with the response returned by the invited member.
property OnChannelInvitationResponse: TsgcWSPresenceChannelResultEvent;
// TsgcWSPresenceChannelResultEvent = procedure(Connection: TsgcWSConnection; const aMember: TsgcWSPresenceMember; const aChannel: TsgcWSPresenceChannel; Accept: Boolean; const aError: TsgcWSPresenceError) of object
—
Fires on the client that called Invite once the invited member's OnChannelInvitation handler has run. Accept is True when the invitee joined aChannel; otherwise False and aError carries the Code and Text returned by the invitee (or a default "invitation cancelled" message).
procedure TForm1.oPresenceChannelInvitationResponse(Connection: TsgcWSConnection;
const aMember: TsgcWSPresenceMember; const aChannel: TsgcWSPresenceChannel;
Accept: Boolean; const aError: TsgcWSPresenceError);
begin
if Accept then
Memo1.Lines.Add(aMember.Name + ' accepted ' + aChannel.Name)
else
Memo1.Lines.Add(aMember.Name + ' declined: ' + aError.Text);
end;