Observable < ChatResult > handleConversationCreated ( ComapiResult < ConversationDetails > result ) { if ( result . isSuccessful ( ) ) { return persistenceController . upsertConversation ( ChatConversation . builder ( ) . populate ( result . getResult ( ) , result . getETag ( ) ) . build ( ) ) . map ( success -> adapter . adaptResult ( result , success ) ) ; } else { return Observable . fromCallable ( ( ) -> adapter . adaptResult ( result ) ) ; } }
Handles conversation create service response .