use of eu.siacs.conversations.entities.StubConversation in project Conversations by siacs.
the class MessageSearchTask method findOrGenerateStub.
private Conversational findOrGenerateStub(String conversationUuid, String accountUuid, String contactJid, int mode) throws Exception {
Conversation conversation = xmppConnectionService.findConversationByUuid(conversationUuid);
if (conversation != null) {
return conversation;
}
Account account = xmppConnectionService.findAccountByUuid(accountUuid);
Jid jid = Jid.of(contactJid);
if (account != null && jid != null) {
return new StubConversation(account, conversationUuid, jid.asBareJid(), mode);
}
throw new Exception("Unable to generate stub for " + contactJid);
}
Aggregations