TsgcWSPClient_PresenceEvents › OnChannelInvitationResponse

OnChannelInvitationResponse Event

Fires on the inviter with the response returned by the invited member.

Syntax

property OnChannelInvitationResponse: TsgcWSPresenceChannelResultEvent;
// TsgcWSPresenceChannelResultEvent = procedure(Connection: TsgcWSConnection; const aMember: TsgcWSPresenceMember; const aChannel: TsgcWSPresenceChannel; Accept: Boolean; const aError: TsgcWSPresenceError) of object

Default Value

Remarks

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).

Example

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;

Back to Events