Send a test message when the chatroom is fully created

This commit is contained in:
QuentinArguillere
2020-07-29 16:18:00 +02:00
parent 00dcfd490f
commit 6bdfe1c70e

View File

@@ -191,6 +191,22 @@ class LinphoneTutorialContext : ObservableObject
}
self.chatroomTutorialState = ChatroomTutorialState.Starting
DispatchQueue.global(qos: .userInitiated).async {
while(self.chatroomTutorialState != ChatroomTutorialState.Started){
usleep(1000000)
}
if let chatRoom = self.mChatRoom
{
do
{
self.mChatMessage = try chatRoom.createMessage(message: "This is my test message")
self.mChatMessage!.addDelegate(delegate: self.mChatMessageDelegate)
self.mChatMessage!.send()
} catch {
print(error)
}
}
}
}
}