Commit 743768be authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Kateryna Kostiuk
Browse files

contact requests: send contact request along with first message

- Adds the sending of an invite automatically upon sending the
  first message in a new conversation.

Change-Id: If3d371036970d81648c33b501a59088fefd394e0
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <>
parent 71ffa200
...@@ -218,6 +218,11 @@ class ConversationViewModel: ViewModel { ...@@ -218,6 +218,11 @@ class ConversationViewModel: ViewModel {
} }
func sendMessage(withContent content: String) { func sendMessage(withContent content: String) {
// send a contact request if this is the first message (implicitly not a contact)
if self.conversation.messages.isEmpty {
self.conversationsService self.conversationsService
.sendMessage(withContent: content, .sendMessage(withContent: content,
from: accountService.currentAccount!, from: accountService.currentAccount!,
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