SubscriptionRequest Event
This event fires when a subscription request is received.
Syntax
public event OnSubscriptionRequestHandler OnSubscriptionRequest; public delegate void OnSubscriptionRequestHandler(object sender, XmppSubscriptionRequestEventArgs e); public class XmppSubscriptionRequestEventArgs : EventArgs { public string From { get; } public string Domain { get; } public bool Accept { get; set; } }
Public Event OnSubscriptionRequest As OnSubscriptionRequestHandler Public Delegate Sub OnSubscriptionRequestHandler(sender As Object, e As XmppSubscriptionRequestEventArgs) Public Class XmppSubscriptionRequestEventArgs Inherits EventArgs Public ReadOnly Property From As String Public ReadOnly Property Domain As String Public Property Accept As Boolean End Class
Remarks
This event fires whenever another XMPP entity requests a subscription to this entity's presence. The XMPP component will parse the requesting entity's Jabber ID into the From and Domain parameters. There is no need to know which resource sent the request, since all instances of the requesting entity's account have access to the same roster.
Accept will initially be false, but setting it to true will cause the XMPP component to allow the remote subscription. Otherwise, the XMPP component will actively deny the subscription request.