diff --git a/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/CommunicationArtifactsHelper.java b/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/CommunicationArtifactsHelper.java index 0b8db6b5b4fa644776e5396b886846b21c83b799..578bb6c544a97c789d46dc22836834b95ef206da 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/CommunicationArtifactsHelper.java +++ b/bindings/java/src/org/sleuthkit/datamodel/blackboardutils/CommunicationArtifactsHelper.java @@ -551,16 +551,16 @@ public BlackboardArtifact addMessage(String messageType, addAttributeIfNotNull(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO, recipientsStr, attributes); break; default: // direction UNKNOWN - - // if no sender, selfAccount substitutes caller. if (StringUtils.isEmpty(senderId)) { + // if no sender, selfAccount substitutes caller. senderAccountInstance = getSelfAccountInstance(); - } - // if no recipient specified, selfAccount substitutes recipient - if (isEffectivelyEmpty(recipientIdsList)) { + } + else if (isEffectivelyEmpty(recipientIdsList)) { + // else if no recipient specified, selfAccount substitutes recipient recipientsStr = getSelfAccountInstance().getAccount().getTypeSpecificID(); recipientAccountsList.add(getSelfAccountInstance()); } + // save phone numbers in direction agnostic attributes if (senderAccountInstance != null) { addAttributeIfNotNull(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER, senderAccountInstance.getAccount().getTypeSpecificID(), attributes);