/// <summary> /// The xmpp on on registered. /// </summary> /// <param name="sender"> /// The sender. /// </param> private void XmppOnOnRegistered(object sender) { this.myPresence.Type = PresenceType.available; this.myPresence.Show = ShowType.chat; this.MucManager = new MucManager(this.xmpp); var room = new Jid("lobby@conference." + this.Config.ChatHost); this.MucManager.AcceptDefaultConfiguration(room); // MucManager.JoinRoom(room,Username,Password,false); this.Me = new User(this.xmpp.MyJID); this.Me.SetStatus(UserStatus.Online); this.xmpp.PresenceManager.Subscribe(this.xmpp.MyJID); var v = new Vcard(); var e = new Email { UserId = this.email, Type = EmailType.INTERNET, Value = this.email }; v.AddChild(e); v.JabberId = new Jid(this.Username + "@" + this.Config.ChatHost); var vc = new VcardIq(IqType.set, v); vc.To = this.Config.ChatHost; vc.GenerateId(); this.xmpp.Send(vc); if (this.OnRegisterComplete != null) { this.OnRegisterComplete.Invoke(this, RegisterResults.Success); } }
private void XmppOnOnRegistered(object sender) { Vcard v = new Vcard(); Email e = new Email { UserId = _email, Type = EmailType.INTERNET, Value = _email }; v.AddChild(e); v.JabberId = new Jid(this.Username + "@" + Host); VcardIq vc = new VcardIq(IqType.set, v); vc.To = Host; vc.GenerateId(); Xmpp.Send(vc); if(OnRegisterComplete != null) OnRegisterComplete.Invoke(this,RegisterResults.Success); }
private void XmppOnOnRosterEnd(object sender) { foreach(var n in Friends) { var viq = new VcardIq{Type = IqType.get , To = n.User.Bare}; viq.GenerateId(); Xmpp.Send(viq); } if(OnDataRecieved != null) OnDataRecieved.Invoke(this,DataRecType.FriendList,Friends); if (Chatting.Rooms.Count(x => x.IsGroupChat && x.GroupUser.User.Bare == "*****@*****.**") == 0) Xmpp.RosterManager.AddRosterItem(new Jid("*****@*****.**")); }