Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
ensure we are updating the group encryption state
Browse files Browse the repository at this point in the history
and also sending postponed messages!
  • Loading branch information
n8fr8 committed May 15, 2018
1 parent da3f5c1 commit 27f864e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ public ChatSessionAdapter(ChatSession chatSession, ImConnectionAdapter connectio

initMuted();
initUseEncryption();

sendPostponedMessages();
}

private void initOtrChatSession (ImEntity participant)
Expand Down Expand Up @@ -277,7 +279,6 @@ private void init(Contact contact, boolean isNewSession) {

mContactStatusMap.put(contact.getName(), contact.getPresence().getStatus());

sendPostponedMessages();

}

Expand Down Expand Up @@ -1858,7 +1859,7 @@ public boolean useEncryption (boolean useEncryption)
mChatSession.setOmemoGroupEnabled(useEncryption);
ContentValues values = new ContentValues();
values.put(Imps.Chats.USE_ENCRYPTION,useEncryption ? 1 : 0);
mContentResolver.update(mChatURI,values,null,null);
int rowsUpdate = mContentResolver.update(mChatURI,values,null,null);
return getUseEncryption();
}

Expand Down

0 comments on commit 27f864e

Please sign in to comment.