private Task XmppClient_OnRosterItemAdded(object _, RosterItem Item) { Log.Informational("Roster item added.", Item.BareJid); if (Item.IsInGroup("Sensor") || Item.IsInGroup("Actuator")) { Log.Informational("Requesting presence subscription.", Item.BareJid); this.xmppClient.RequestPresenceSubscription(Item.BareJid); } return Task.CompletedTask; }
private Task OnRosterItemAdded(object obj, RosterItem Item) { Console.Write("Roster Item Added " + Item.BareJid); if (Item.IsInGroup("Sensor")) { if (Item.IsInGroup("Sensor")) { Console.WriteLine("Requesting presence subscription." + Item.BareJid); this.xmppClient.RequestPresenceSubscription(Item.BareJid); } } return(Task.CompletedTask); }