Пример #1
0
        void HandleOnBeforePresenceOut(object sender, Presence pres)
        {
            var e = new Element("ResourceDisplay", "http://synapse.im/protocol/resourcedisplay", m_Client.Document);

            e.InnerText = m_RequestedResource;
            pres.AppendChild(e);
        }
Пример #2
0
        void HandleOnBeforePresenceOut(object sender, Presence pres)
        {
            Element vcardUpdateElem = new Element("x", "vcard-temp:x:update", m_Account.Client.Document);
            Element photoElem       = new Element("photo", m_Account.Client.Document);

            vcardUpdateElem.AppendChild(photoElem);

            if (GetAvatarHash(m_Account.Jid) != null)
            {
                photoElem.InnerText = GetAvatarHash(m_Account.Jid);
            }

            pres.AppendChild(vcardUpdateElem);
        }
Пример #3
0
 private void GotList(object sender, IQ iq, object state)
 {
     RetrieveParticipantsState rps = (RetrieveParticipantsState)state;
     if (iq.Type == IQType.error)
     {
         rps.Callback(this, null, rps.State);
         return;
     }
     /*
     <iq from='*****@*****.**'
         id='ban2'
         to='[email protected]/throne'
         type='result'>
       <query xmlns='http://jabber.org/protocol/muc#admin'>
         <item affiliation='outcast'
               jid='*****@*****.**'>
           <reason>Treason</reason>
         </item>
       </query>
     </iq>
     */
     ParticipantCollection parties = new ParticipantCollection();
     AdminQuery query = (AdminQuery)iq.Query;
     ParticipantCollection.Modification mod;
     foreach (AdminItem item in query.GetItems())
     {
         Presence pres = new Presence(m_manager.Stream.Document);
         pres.From = new JID(m_jid.User, m_jid.Server, item.Nick);
         UserX x = new UserX(m_manager.Stream.Document);
         RoomItem xi = x.RoomItem;
         xi.Role = item.Role;
         xi.Affiliation = item.Affiliation;
         xi.Nick = item.Nick;
         xi.JID = item.JID;
         pres.AppendChild(x);
         parties.Modify(pres, out mod);
     }
     rps.Callback(this, parties, rps.State);
 }
Пример #4
0
 private void jc_OnBeforePresenceOut(object sender, Presence pres)
 {
     Debug.Assert(Node != null, "Node is required");
     pres.AppendChild(GetCaps(pres.OwnerDocument));
 }
Пример #5
0
 private void jc_OnBeforePresenceOut(object sender, Presence pres)
 {
     Debug.Assert(Node != null, "Node is required");
     pres.AppendChild(GetCaps(pres.OwnerDocument));
 }
Пример #6
0
        void HandleOnBeforePresenceOut(object sender, Presence pres)
        {
            Element vcardUpdateElem = new Element("x", "vcard-temp:x:update", m_Account.Client.Document);
            Element photoElem = new Element("photo", m_Account.Client.Document);
            vcardUpdateElem.AppendChild(photoElem);

            if (GetAvatarHash(m_Account.Jid) != null) {
                photoElem.InnerText = GetAvatarHash(m_Account.Jid);
            }

            pres.AppendChild(vcardUpdateElem);
        }