Search in sources :

Example 1 with OnMessageCreatedCallback

use of de.pixart.messenger.crypto.axolotl.OnMessageCreatedCallback in project Pix-Art-Messenger by kriztan.

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(de.pixart.messenger.crypto.axolotl.OnMessageCreatedCallback) Conversation(de.pixart.messenger.entities.Conversation) XmppAxolotlMessage(de.pixart.messenger.crypto.axolotl.XmppAxolotlMessage)

Aggregations

OnMessageCreatedCallback (de.pixart.messenger.crypto.axolotl.OnMessageCreatedCallback)1 XmppAxolotlMessage (de.pixart.messenger.crypto.axolotl.XmppAxolotlMessage)1 Conversation (de.pixart.messenger.entities.Conversation)1