public void SetPresence(PresenceStatus status, Capabilities caps, string strImageHash) { PresenceMessage pres = new PresenceMessage(null); pres.From = XMPPClient.JID; pres.To = null; pres.PresenceStatus = status; pres.Capabilities = caps; if ((strImageHash != null) && (strImageHash.Length > 0)) { pres.VCardUpdate = new VCardUpdate(); pres.VCardUpdate.PhotoHash = strImageHash; } XMPPClient.SendObject(pres); }