Skip to content

Commit

Permalink
sepinf-inc#2286: check owner instead of account to get the other chat…
Browse files Browse the repository at this point in the history
… participant
  • Loading branch information
aberenguel committed Aug 15, 2024
1 parent 1dd1bbb commit 67f29ab
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ private String getMetaFromAttachOrMsg(String key, IItemReader msg, IItemReader a

public static String getChatName(IItemReader item) {

String owner = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Owner");
String source = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Source");
String chatType = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "ChatType");
String name = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Name");
String id = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "id");
String[] participants = item.getMetadata().getValues(ExtraProperties.COMMUNICATION_PARTICIPANTS);
String account = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Account");

StringBuilder sb = new StringBuilder();
sb.append(source).append(' ');
Expand All @@ -375,9 +375,9 @@ public static String getChatName(IItemReader item) {
if (name != null) {
sb.append(name);
} else if (participants.length == 2) {
if (participants[0].contains(account)) {
if (participants[0].equals(owner)) {
sb.append(participants[1]);
} else if (participants[1].contains(account)) {
} else if (participants[1].equals(owner)) {
sb.append(participants[0]);
} else {
sb.append(participants[0]).append('_').append(participants[1]);
Expand Down

0 comments on commit 67f29ab

Please sign in to comment.