Search in sources :

Example 1 with OnMessageCreatedCallback

use of eu.siacs.conversations.crypto.axolotl.OnMessageCreatedCallback in project Conversations by siacs.

the class JingleConnection method init.

public void init(final Message message) {
    if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) {
        Conversation conversation = message.getConversation();
        conversation.getAccount().getAxolotlService().prepareKeyTransportMessage(conversation, new OnMessageCreatedCallback() {

            @Override
            public void run(XmppAxolotlMessage xmppAxolotlMessage) {
                if (xmppAxolotlMessage != null) {
                    init(message, xmppAxolotlMessage);
                } else {
                    fail();
                }
            }
        });
    } else {
        init(message, null);
    }
}
Also used : OnMessageCreatedCallback(eu.siacs.conversations.crypto.axolotl.OnMessageCreatedCallback) Conversation(eu.siacs.conversations.entities.Conversation) XmppAxolotlMessage(eu.siacs.conversations.crypto.axolotl.XmppAxolotlMessage)

Aggregations

OnMessageCreatedCallback (eu.siacs.conversations.crypto.axolotl.OnMessageCreatedCallback)1 XmppAxolotlMessage (eu.siacs.conversations.crypto.axolotl.XmppAxolotlMessage)1 Conversation (eu.siacs.conversations.entities.Conversation)1