TsgcWSPServer_Presence › Events › OnRemoveChannelMember
Fired when a member leaves a channel, whether by unsubscribing or disconnecting.
property OnRemoveChannelMember: TsgcWSPresenceRemoveMemberChannelEvent;
// TsgcWSPresenceRemoveMemberChannelEvent = procedure(Connection: TsgcWSConnection; const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember) of object
—
Called whenever a member is removed from a channel: this includes explicit unsubscribe requests from the client and automatic cleanup triggered by a disconnect. All remaining channel subscribers are notified so they can update their local rosters.
procedure TForm1.sgcWSPServer_Presence1RemoveChannelMember(Connection: TsgcWSConnection;
const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember);
begin
Log('Member ' + aMember.Name + ' left channel ' + aChannel.Name);
end;