Use local Sone in Sone inserter.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index 4f74fe5..5ae2f73 100644 (file)
@@ -215,12 +215,12 @@ public class SoneInserter extends AbstractService {
                                sleep(delay);
 
                                if (soneModificationDetector.isEligibleForInsert()) {
-                                       Optional<Sone> soneOptional = core.getSone(soneId);
+                                       Optional<LocalSone> soneOptional = core.getLocalSone(soneId);
                                        if (!soneOptional.isPresent()) {
                                                logger.log(Level.WARNING, format("Sone %s has disappeared, exiting inserter.", soneId));
                                                return;
                                        }
-                                       Sone sone = soneOptional.get();
+                                       LocalSone sone = soneOptional.get();
                                        InsertInformation insertInformation = new InsertInformation(sone);
                                        logger.log(Level.INFO, String.format("Inserting Sone ā€œ%sā€ā€¦", sone.getName()));