Commit 5e912612 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk
Browse files

contact request: send VCard

Change-Id: If6c1995a436dff5da2215fa3262963b412fee0c5
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <>
parent 85f3ac2a
......@@ -231,10 +231,12 @@ class ConversationViewModel: ViewModel {
func sendContactRequest() {
self.contactsService.sendContactRequest(toContactRingId: self.conversation.recipientRingId, vCard: nil, withAccount: self.accountService.currentAccount!)
.subscribe(onCompleted: {"request sent")
.disposed(by: disposeBag)
self.accountService.loadVCard(forAccounr: self.accountService.currentAccount!)
.subscribe(onSuccess: { card in
self.contactsService.sendContactRequest(toContactRingId: self.conversation.recipientRingId, vCard: card, withAccount: self.accountService.currentAccount!).subscribe(onCompleted: {"contact request sent")
}).disposed(by: self.disposeBag)
}).disposed(by: self.disposeBag)
......@@ -126,7 +126,7 @@ class ContactsService {
var payload: Data?
if let vCard = vCard {
payload = try [vCard])
payload = try CNContactVCardSerialization.dataWithImageAndUUID(from: vCard, andImageCompression: 40000)
self.contactsAdapter.sendTrustRequest(toContact: ringId, payload: payload, withAccountId:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment