private void rm_OnSubscription(Jabber.Client.RosterManager manager, Item ri, Presence pres) { DialogResult res = MessageBox.Show("Allow incoming presence subscription request from: " + pres.From, "Subscription Request", MessageBoxButtons.YesNoCancel); switch (res) { case DialogResult.Yes: manager.ReplyAllow(pres); break; case DialogResult.No: manager.ReplyDeny(pres); break; case DialogResult.Cancel: // do nothing; break; } }
private void rm_OnUnsubscription(Jabber.Client.RosterManager manager, Presence pres, ref bool remove) { MessageBox.Show(pres.From + " has removed you from their roster.", "Unsubscription notification", MessageBoxButtons.OK); }