blob: b21ddcddd71d1261f4d1e1489a22426944b78d8f [file] [log] [blame]
class Contact {
constructor(uri) {
this.uri = uri
this.displayName = undefined
this.registeredName = undefined
}
static from(object) {
return new Contact(object.uri)
}
getUri() { return this.uri }
getRegisteredName() { this.registeredName }
getDisplayName() {
return this.displayName || this.getRegisteredName() || this.getUri()
}
getObject() {
return {
uri: this.uri
}
}
}
module.exports = Contact;