Skip to content

Commit

Permalink
sepinf-inc#2286: add "Communication:ID" metadata for UFED reader and …
Browse files Browse the repository at this point in the history
…Telegram parser
  • Loading branch information
aberenguel committed Aug 9, 2024
1 parent c8801ee commit 0420f6f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iped-api/src/main/java/iped/properties/ExtraProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public class ExtraProperties {

public static final String COMMUNICATION_PREFIX = "Communication:";

public static final String COMMUNICATION_ID = COMMUNICATION_PREFIX + "ID";

public static final String COMMUNICATION_FROM = COMMUNICATION_PREFIX + "From";

public static final String COMMUNICATION_TO = COMMUNICATION_PREFIX + "To";
Expand Down
1 change: 1 addition & 0 deletions iped-app/resources/config/conf/metadataTypes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ common:meta:last-author = java.lang.String
common:w:Comments = java.lang.String
common:xmp:CreatorTool = java.lang.String
Manager = java.lang.Integer
Communication:ID = java.lang.String
Communication:Date = java.util.Date
Communication:From = java.lang.String
Communication:To = java.lang.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,8 @@ else if (parentItem.getMediaType().equals(MediaTypes.UFED_MESSAGE_MIME)) {
item.getMetadata().set(ExtraProperties.COMMUNICATION_TYPE, CommunicationConstants.TYPE_UNKONWN);
}

item.getMetadata().set(ExtraProperties.COMMUNICATION_ID, item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Id"));

String ufedAccount = item.getMetadata().get(ExtraProperties.UFED_META_PREFIX + "Account");
if (ufedAccount != null) {
item.getMetadata().set(ExtraProperties.COMMUNICATION_ACCOUNT, ufedAccount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ private void generateChat(Chat c, Contact account, Extractor e, IItemSearcher se
chatMetadata.set(ExtraProperties.COMMUNICATION_TYPE, CommunicationConstants.TYPE_PRIVATE);
}

chatMetadata.set(ExtraProperties.COMMUNICATION_ID, Long.toString(c.getId()));
chatMetadata.set(ExtraProperties.COMMUNICATION_ACCOUNT, e.getUserAccount().toString());

List<Message> msgSubset = c.getMessages().subList(firstMsg, nextMsg);
Expand Down

0 comments on commit 0420f6f

Please sign in to comment.