From: David ‘Bombe’ Roden Date: Fri, 26 Feb 2016 19:39:46 +0000 (+0100) Subject: Use compatibility mode for getting likes, too X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=df37c71a5b53af746f2c0c8b7ce8c1d4ae33486f;p=Sone.git Use compatibility mode for getting likes, too --- 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; }