From df37c71a5b53af746f2c0c8b7ce8c1d4ae33486f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 26 Feb 2016 20:39:46 +0100 Subject: [PATCH] Use compatibility mode for getting likes, too --- src/main/java/net/pterodactylus/sone/core/Core.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index e56eede..e3fd103 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -515,6 +515,11 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, if (sone.getLikedPostIds().contains(post.getId())) { sones.add(sone); } + if (isCompatibilityMode(CompatibilityMode.oldElementIds)) { + if (sone.getLikedPostIds().contains(post.getInternalId())) { + sones.add(sone); + } + } } return sones; } @@ -532,6 +537,11 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, if (sone.getLikedReplyIds().contains(reply.getId())) { sones.add(sone); } + if (isCompatibilityMode(CompatibilityMode.oldElementIds)) { + if (sone.getLikedReplyIds().contains(reply.getInternalId())) { + sones.add(sone); + } + } } return sones; } -- 2.7.4