Example #1
0
        /// <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);
            }
        }
Example #2
0
        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);
            }
        }