Use compatibility mode for getting likes, too feature/album-and-image-links
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Feb 2016 19:39:46 +0000 (20:39 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Feb 2016 19:39:46 +0000 (20:39 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index e56eede..e3fd103 100644 (file)
@@ -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;
        }