diff options
author | 2018-10-06 22:19:35 +0300 | |
---|---|---|
committer | 2018-10-06 22:19:35 +0300 | |
commit | 6de186c9712311e5205187ca99ebb24c342e0a5f (patch) | |
tree | 81a1a8935e414bead5d0d4656d3ab6a9bda6f20a /juick-server/src/main/java | |
parent | 217a8423866ccbf54e3fd9269b104c23a3713f47 (diff) |
fix NPE
Diffstat (limited to 'juick-server/src/main/java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/Profile.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java index a8019341..5328a592 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java @@ -288,7 +288,7 @@ public class Profile { User user = new User(); user.setUri(URI.create(activity.getActor())); Map<String, Object> attachmentObj = (Map<String, Object> )((List<Object>) note.get("attachment")).get(0); - String attachment = attachmentObj != null ? (String)attachmentObj.get("url") : StringUtils.EMPTY; + String attachment = note.get("attachment") != null ? (String)attachmentObj.get("url") : StringUtils.EMPTY; CommandResult result = commandsManager.processCommand(user, String.format("#%s %s", postId, note.get("content")), URI.create(attachment)); logger.info(jsonMapper.writeValueAsString(result)); if (result.getNewMessage().isPresent()) { |