Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
correct double open tchat
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-modernisation-gouv-fr committed Jun 17, 2018
1 parent 57b7a89 commit fe21298
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vector/src/main/java/fr/gouv/tchap/util/DinsicUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,11 @@ public static void startDirectChat(final RiotAppCompatActivity activity, final M
// Tell if contact is tchap user
if (MXSession.isUserId(selectedContact.mUserId)) { // || DinsicUtils.isFromFrenchGov(item.mContact.getEmails()))
// The contact is a Tchap user
if (DinsicUtils.openDirectChat(activity, selectedContact.mUserId, session, false)) {
// If a direct chat already exist with him, open it
DinsicUtils.openDirectChat(activity, selectedContact.mUserId, session, true);
} else {
if (!DinsicUtils.openDirectChat(activity, selectedContact.mUserId, session, false)) {
//to be consciensously reviewed!
// // If a direct chat already exist with him, open it
// DinsicUtils.openDirectChat(activity, selectedContact.mUserId, session, true);
// } else {
// If it's a Tchap user without a direct chat with him
// Display a popup to confirm the creation of a new direct chat with him
String msg = activity.getResources().getString(R.string.start_new_chat_prompt_msg, selectedContact.mDisplayName);
Expand Down

0 comments on commit fe21298

Please sign in to comment.