forked from mirrors/linphone-iphone
Replaced all null address.username with address.asStringUriOnly
This commit is contained in:
parent
6d116b6cec
commit
992afa16cf
14 changed files with 201 additions and 65 deletions
|
|
@ -368,6 +368,8 @@ class TelecomManager: ObservableObject {
|
||||||
completion(call.remoteAddress!.displayName!)
|
completion(call.remoteAddress!.displayName!)
|
||||||
} else if call.remoteAddress!.username != nil {
|
} else if call.remoteAddress!.username != nil {
|
||||||
completion(call.remoteAddress!.username!)
|
completion(call.remoteAddress!.username!)
|
||||||
|
} else {
|
||||||
|
completion(String(call.remoteAddress!.asStringUriOnly().dropFirst(4)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -475,6 +477,8 @@ class TelecomManager: ObservableObject {
|
||||||
displayName = call.remoteAddress!.displayName!
|
displayName = call.remoteAddress!.displayName!
|
||||||
} else if call.remoteAddress!.username != nil {
|
} else if call.remoteAddress!.username != nil {
|
||||||
displayName = call.remoteAddress!.username!
|
displayName = call.remoteAddress!.username!
|
||||||
|
} else {
|
||||||
|
displayName = String(call.remoteAddress!.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,13 @@ class ParticipantModel: ObservableObject {
|
||||||
if let addressFriend = friendResult {
|
if let addressFriend = friendResult {
|
||||||
self.name = addressFriend.name!
|
self.name = addressFriend.name!
|
||||||
} else {
|
} else {
|
||||||
self.name = address.displayName != nil ? address.displayName! : address.username!
|
if address.displayName != nil {
|
||||||
|
self.name = address.displayName!
|
||||||
|
} else if address.username != nil {
|
||||||
|
self.name = address.username!
|
||||||
|
} else {
|
||||||
|
self.name = String(address.asStringUriOnly().dropFirst(4))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,8 @@ class CallViewModel: ObservableObject {
|
||||||
displayNameTmp = self.currentCall!.remoteAddress!.displayName!
|
displayNameTmp = self.currentCall!.remoteAddress!.displayName!
|
||||||
} else if self.currentCall!.remoteAddress!.username != nil && displayNameTmp.isEmpty {
|
} else if self.currentCall!.remoteAddress!.username != nil && displayNameTmp.isEmpty {
|
||||||
displayNameTmp = self.currentCall!.remoteAddress!.username!
|
displayNameTmp = self.currentCall!.remoteAddress!.username!
|
||||||
|
} else if displayNameTmp.isEmpty {
|
||||||
|
displayNameTmp = String(self.currentCall!.remoteAddress!.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -351,6 +353,8 @@ class CallViewModel: ObservableObject {
|
||||||
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.displayName!
|
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.displayName!
|
||||||
} else if activeSpeakerParticipantTmp!.address.username != nil {
|
} else if activeSpeakerParticipantTmp!.address.username != nil {
|
||||||
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.username!
|
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.username!
|
||||||
|
} else {
|
||||||
|
activeSpeakerNameTmp = String(activeSpeakerParticipantTmp!.address.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -467,7 +471,9 @@ class CallViewModel: ObservableObject {
|
||||||
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.displayName!
|
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.displayName!
|
||||||
} else if activeSpeakerParticipantTmp!.address.username != nil {
|
} else if activeSpeakerParticipantTmp!.address.username != nil {
|
||||||
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.username!
|
activeSpeakerNameTmp = activeSpeakerParticipantTmp!.address.username!
|
||||||
}
|
} else {
|
||||||
|
activeSpeakerNameTmp = String(activeSpeakerParticipantTmp!.address.asStringUriOnly().dropFirst(4))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
if self.activeSpeakerParticipant == nil {
|
if self.activeSpeakerParticipant == nil {
|
||||||
|
|
@ -594,6 +600,8 @@ class CallViewModel: ObservableObject {
|
||||||
activeSpeakerNameTmp = activeSpeakerParticipantTmp.address.displayName!
|
activeSpeakerNameTmp = activeSpeakerParticipantTmp.address.displayName!
|
||||||
} else if activeSpeakerParticipantTmp.address.username != nil {
|
} else if activeSpeakerParticipantTmp.address.username != nil {
|
||||||
activeSpeakerNameTmp = activeSpeakerParticipantTmp.address.username!
|
activeSpeakerNameTmp = activeSpeakerParticipantTmp.address.username!
|
||||||
|
} else {
|
||||||
|
activeSpeakerNameTmp = String(activeSpeakerParticipantTmp.address.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ class MeetingWaitingRoomViewModel: ObservableObject {
|
||||||
userNameTmp = core.defaultAccount!.contactAddress!.displayName!
|
userNameTmp = core.defaultAccount!.contactAddress!.displayName!
|
||||||
} else if core.defaultAccount!.contactAddress!.username != nil {
|
} else if core.defaultAccount!.contactAddress!.username != nil {
|
||||||
userNameTmp = core.defaultAccount!.contactAddress!.username!
|
userNameTmp = core.defaultAccount!.contactAddress!.username!
|
||||||
|
} else {
|
||||||
|
userNameTmp = String(core.defaultAccount!.contactAddress!.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,11 +149,25 @@ class ContactAvatarModel: ObservableObject, Identifiable {
|
||||||
}
|
}
|
||||||
completion(avatarModel!)
|
completion(avatarModel!)
|
||||||
} else {
|
} else {
|
||||||
let name = address.displayName != nil ? address.displayName! : address.username!
|
var name = ""
|
||||||
|
if address.displayName != nil {
|
||||||
|
name = address.displayName!
|
||||||
|
} else if address.username != nil {
|
||||||
|
name = address.username!
|
||||||
|
} else {
|
||||||
|
name = String(address.asStringUriOnly().dropFirst(4))
|
||||||
|
}
|
||||||
completion(ContactAvatarModel(friend: nil, name: name, address: address.asStringUriOnly(), withPresence: false))
|
completion(ContactAvatarModel(friend: nil, name: name, address: address.asStringUriOnly(), withPresence: false))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let name = address.displayName != nil ? address.displayName! : address.username!
|
var name = ""
|
||||||
|
if address.displayName != nil {
|
||||||
|
name = address.displayName!
|
||||||
|
} else if address.username != nil {
|
||||||
|
name = address.username!
|
||||||
|
} else {
|
||||||
|
name = String(address.asStringUriOnly().dropFirst(4))
|
||||||
|
}
|
||||||
completion(ContactAvatarModel(friend: nil, name: name, address: address.asStringUriOnly(), withPresence: false))
|
completion(ContactAvatarModel(friend: nil, name: name, address: address.asStringUriOnly(), withPresence: false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -276,20 +276,44 @@ struct ConversationForwardMessageFragment: View {
|
||||||
} label: {
|
} label: {
|
||||||
HStack {
|
HStack {
|
||||||
if index < contactsManager.lastSearchSuggestions.count
|
if index < contactsManager.lastSearchSuggestions.count
|
||||||
&& contactsManager.lastSearchSuggestions[index].address != nil
|
&& contactsManager.lastSearchSuggestions[index].address != nil {
|
||||||
&& contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
if contactsManager.lastSearchSuggestions[index].address!.displayName != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
Image(uiImage: contactsManager.textToImage(
|
firstName: contactsManager.lastSearchSuggestions[index].address!.displayName!,
|
||||||
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
lastName: ""))
|
||||||
lastName: ""))
|
.resizable()
|
||||||
.resizable()
|
.frame(width: 45, height: 45)
|
||||||
.frame(width: 45, height: 45)
|
.clipShape(Circle())
|
||||||
.clipShape(Circle())
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address?.displayName ?? "")
|
||||||
Text(contactsManager.lastSearchSuggestions[index].address?.username ?? "")
|
.default_text_style(styleSize: 16)
|
||||||
.default_text_style(styleSize: 16)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.foregroundStyle(Color.orangeMain500)
|
||||||
.foregroundStyle(Color.orangeMain500)
|
} else if contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address!.username ?? "")
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
} else {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)),
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)))
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Image("profil-picture-default")
|
Image("profil-picture-default")
|
||||||
.resizable()
|
.resizable()
|
||||||
|
|
|
||||||
|
|
@ -274,20 +274,44 @@ struct StartConversationFragment: View {
|
||||||
} label: {
|
} label: {
|
||||||
HStack {
|
HStack {
|
||||||
if index < contactsManager.lastSearchSuggestions.count
|
if index < contactsManager.lastSearchSuggestions.count
|
||||||
&& contactsManager.lastSearchSuggestions[index].address != nil
|
&& contactsManager.lastSearchSuggestions[index].address != nil {
|
||||||
&& contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
if contactsManager.lastSearchSuggestions[index].address!.displayName != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
Image(uiImage: contactsManager.textToImage(
|
firstName: contactsManager.lastSearchSuggestions[index].address!.displayName!,
|
||||||
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
lastName: ""))
|
||||||
lastName: ""))
|
.resizable()
|
||||||
.resizable()
|
.frame(width: 45, height: 45)
|
||||||
.frame(width: 45, height: 45)
|
.clipShape(Circle())
|
||||||
.clipShape(Circle())
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address?.displayName ?? "")
|
||||||
Text(contactsManager.lastSearchSuggestions[index].address?.username ?? "")
|
.default_text_style(styleSize: 16)
|
||||||
.default_text_style(styleSize: 16)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.foregroundStyle(Color.orangeMain500)
|
||||||
.foregroundStyle(Color.orangeMain500)
|
} else if contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address!.username ?? "")
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
} else {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)),
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)))
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Image("profil-picture-default")
|
Image("profil-picture-default")
|
||||||
.resizable()
|
.resizable()
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ class ConversationModel: ObservableObject, Identifiable {
|
||||||
} else if lastMessage!.fromAddress!.username != nil {
|
} else if lastMessage!.fromAddress!.username != nil {
|
||||||
fromAddressFriend = lastMessage!.fromAddress!.username! + ": "
|
fromAddressFriend = lastMessage!.fromAddress!.username! + ": "
|
||||||
} else {
|
} else {
|
||||||
fromAddressFriend = ""
|
fromAddressFriend = String(lastMessage!.fromAddress!.asStringUriOnly().dropFirst(4)) + ": "
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fromAddressFriend! += ": "
|
fromAddressFriend! += ": "
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,13 @@ class EventModel: ObservableObject {
|
||||||
if let addressFriend = friendResult {
|
if let addressFriend = friendResult {
|
||||||
name = addressFriend.name!
|
name = addressFriend.name!
|
||||||
} else {
|
} else {
|
||||||
name = address!.displayName != nil ? address!.displayName! : address!.username!
|
if address!.displayName != nil {
|
||||||
|
name = address!.displayName!
|
||||||
|
} else if address!.username != nil {
|
||||||
|
name = address!.username!
|
||||||
|
} else {
|
||||||
|
name = String(address!.asStringUriOnly().dropFirst(4))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let textValue: String
|
let textValue: String
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ class ConversationsListViewModel: ObservableObject {
|
||||||
} else if message.fromAddress!.username != nil {
|
} else if message.fromAddress!.username != nil {
|
||||||
fromAddressFriend = message.fromAddress!.username! + ": "
|
fromAddressFriend = message.fromAddress!.username! + ": "
|
||||||
} else {
|
} else {
|
||||||
fromAddressFriend = ""
|
fromAddressFriend = String(message.fromAddress!.asStringUriOnly().dropFirst(4)) + ": "
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fromAddressFriend! += ": "
|
fromAddressFriend! += ": "
|
||||||
|
|
|
||||||
|
|
@ -375,20 +375,44 @@ struct StartCallFragment: View {
|
||||||
} label: {
|
} label: {
|
||||||
HStack {
|
HStack {
|
||||||
if index < contactsManager.lastSearchSuggestions.count
|
if index < contactsManager.lastSearchSuggestions.count
|
||||||
&& contactsManager.lastSearchSuggestions[index].address != nil
|
&& contactsManager.lastSearchSuggestions[index].address != nil {
|
||||||
&& contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
if contactsManager.lastSearchSuggestions[index].address!.displayName != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
Image(uiImage: contactsManager.textToImage(
|
firstName: contactsManager.lastSearchSuggestions[index].address!.displayName!,
|
||||||
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
lastName: ""))
|
||||||
lastName: ""))
|
.resizable()
|
||||||
.resizable()
|
.frame(width: 45, height: 45)
|
||||||
.frame(width: 45, height: 45)
|
.clipShape(Circle())
|
||||||
.clipShape(Circle())
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address?.displayName ?? "")
|
||||||
Text(contactsManager.lastSearchSuggestions[index].address?.username ?? "")
|
.default_text_style(styleSize: 16)
|
||||||
.default_text_style(styleSize: 16)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.foregroundStyle(Color.orangeMain500)
|
||||||
.foregroundStyle(Color.orangeMain500)
|
} else if contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address!.username ?? "")
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
} else {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)),
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)))
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Image("profil-picture-default")
|
Image("profil-picture-default")
|
||||||
.resizable()
|
.resizable()
|
||||||
|
|
|
||||||
|
|
@ -258,20 +258,44 @@ struct AddParticipantsFragment: View {
|
||||||
} label: {
|
} label: {
|
||||||
HStack {
|
HStack {
|
||||||
if index < contactsManager.lastSearchSuggestions.count
|
if index < contactsManager.lastSearchSuggestions.count
|
||||||
&& contactsManager.lastSearchSuggestions[index].address != nil
|
&& contactsManager.lastSearchSuggestions[index].address != nil {
|
||||||
&& contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
if contactsManager.lastSearchSuggestions[index].address!.displayName != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
Image(uiImage: contactsManager.textToImage(
|
firstName: contactsManager.lastSearchSuggestions[index].address!.displayName!,
|
||||||
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
lastName: ""))
|
||||||
lastName: ""))
|
.resizable()
|
||||||
.resizable()
|
.frame(width: 45, height: 45)
|
||||||
.frame(width: 45, height: 45)
|
.clipShape(Circle())
|
||||||
.clipShape(Circle())
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address?.displayName ?? "")
|
||||||
Text(contactsManager.lastSearchSuggestions[index].address?.username ?? "")
|
.default_text_style(styleSize: 16)
|
||||||
.default_text_style(styleSize: 16)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.foregroundStyle(Color.orangeMain500)
|
||||||
.foregroundStyle(Color.orangeMain500)
|
} else if contactsManager.lastSearchSuggestions[index].address!.username != nil {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: contactsManager.lastSearchSuggestions[index].address!.username!,
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(contactsManager.lastSearchSuggestions[index].address!.username ?? "")
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
} else {
|
||||||
|
Image(uiImage: contactsManager.textToImage(
|
||||||
|
firstName: String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)),
|
||||||
|
lastName: ""))
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.clipShape(Circle())
|
||||||
|
|
||||||
|
Text(String(contactsManager.lastSearchSuggestions[index].address!.asStringUriOnly().dropFirst(4)))
|
||||||
|
.default_text_style(styleSize: 16)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.foregroundStyle(Color.orangeMain500)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Image("profil-picture-default")
|
Image("profil-picture-default")
|
||||||
.resizable()
|
.resizable()
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ extension Account {
|
||||||
if address.username != nil && !address.username!.isEmpty {
|
if address.username != nil && !address.username!.isEmpty {
|
||||||
return address.username!
|
return address.username!
|
||||||
}
|
}
|
||||||
return address.asStringUriOnly()
|
return String(address.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
|
|
||||||
static func == (lhs: Account, rhs: Account) -> Bool {
|
static func == (lhs: Account, rhs: Account) -> Bool {
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ class NotificationService: UNNotificationServiceExtension {
|
||||||
} else if chatRoom.peerAddress!.username != nil {
|
} else if chatRoom.peerAddress!.username != nil {
|
||||||
bestAttemptContent.body = chatRoom.peerAddress!.username!
|
bestAttemptContent.body = chatRoom.peerAddress!.username!
|
||||||
} else {
|
} else {
|
||||||
bestAttemptContent.body = "Peer Address Error"
|
bestAttemptContent.body = String(chatRoom.peerAddress!.asStringUriOnly().dropFirst(4))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bestAttemptContent.body = "Peer Address Error"
|
bestAttemptContent.body = "Peer Address Error"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue