Search in sources :

Example 1 with OnPresenceSelected

use of eu.siacs.conversations.ui.XmppActivity.OnPresenceSelected in project Conversations by siacs.

the class ConversationFragment method sendOtrMessage.

protected void sendOtrMessage(final Message message) {
    final ConversationActivity activity = (ConversationActivity) getActivity();
    final XmppConnectionService xmppService = activity.xmppConnectionService;
    activity.selectPresence(message.getConversation(), new OnPresenceSelected() {

        @Override
        public void onPresenceSelected() {
            message.setCounterpart(conversation.getNextCounterpart());
            xmppService.sendMessage(message);
            messageSent();
        }
    });
}
Also used : XmppConnectionService(eu.siacs.conversations.services.XmppConnectionService) OnPresenceSelected(eu.siacs.conversations.ui.XmppActivity.OnPresenceSelected)

Aggregations

XmppConnectionService (eu.siacs.conversations.services.XmppConnectionService)1 OnPresenceSelected (eu.siacs.conversations.ui.XmppActivity.OnPresenceSelected)1