another.im-ios/Monal/another.im/XMPP/Models/Contact.swift
2024-11-29 18:35:20 +01:00

17 lines
345 B
Swift

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