another.im-ios/Monal/another.im/XMPP/Models/Contact.swift
2024-11-29 23:36:19 +01:00

21 lines
393 B
Swift

import Foundation
import monalxmpp
struct Contact: Identifiable {
let ownerId: Int
let contactJid: String
private let nickname: String?
var id: String { contactJid }
var name: String {
nickname ?? contactJid
}
init?(_ obj: MLContact) {
ownerId = obj.accountID.intValue
contactJid = obj.contactJid
nickname = obj.nickName
}
}