createThread function
Implementation
Future<Conversation> createThread() async {
var rep = createThreadsRepository();
var conversation = await rep.create();
var id = conversation.id;
if (id != null) {
await saveThreadId(id);
} else {
logger.warn('Unable to save thread: No id.');
}
return conversation;
}