public Vcard Get(Jid jid)
 {
     if (jid == null)
     {
         return(null);
     }
     return(Get(JIDEscaping.Unescape(jid.User)));
 }
Example #2
0
        public void PutPresence(Presence presence)
        {
            var db         = GetDatabase();
            var collection = db.GetCollection("offline_presence");

            collection.Insert(
                new BsonDocument(
                    new BsonElement("from", JIDEscaping.Unescape(presence.From.User)),
                    new BsonElement("to", JIDEscaping.Unescape(presence.To.User)),
                    new BsonElement("type", presence.Type.ToString()),
                    new BsonElement("value", presence.ToString())
                    ));
        }
 public bool Set(Jid jid, Vcard vcard)
 {
     return(Set(JIDEscaping.Unescape(jid), vcard));
 }
 public Session GetSession(Jid jid)
 {
     return(GetSession(JIDEscaping.Unescape(jid.User)));
 }