public JsFederatedDude(ContactsNotificationService.JsContact contact) { this.Contact = contact; this.AccountHandles = new List<int>(1); }
public static ContactsNotificationService.JsContact Create(UberChatClient client, Contact contact) { ContactsNotificationService.JsContact jsContact = new ContactsNotificationService.JsContact() { InternalId = string.Format("{0}//{1}", client.RealmId, contact.Id), RealmId = client.RealmId, Presence = contact.Presences.OrderBy<Presence, int>(new Func<Presence, int>(ContactsNotificationService.GetPresenceOrder)).FirstOrDefault<Presence>() ?? ContactsNotificationService.OfflinePresence, Id = contact.Id, Jid = contact.Jid, Name = contact.Name, Groups = contact.Groups, Presences = contact.Presences, ConferenceUser = contact.ConferenceUser, BareJid = contact.BareJid }; return jsContact; }