}
logger.info(String.format("Adding Sone from OwnIdentity: %s", ownIdentity));
LocalSone sone = database.registerLocalSone(ownIdentity);
- SoneInserter soneInserter = new SoneInserter(this, eventBus, freenetInterface, ownIdentity.getId());
+ SoneInserter soneInserter = new SoneInserter(this, eventBus, freenetInterface, database, ownIdentity.getId());
eventBus.register(soneInserter);
synchronized (soneInserters) {
soneInserters.put(sone, soneInserter);
final Post post = postBuilder.build();
database.storePost(post);
eventBus.post(new NewPostFoundEvent(post));
- sone.addPost(post);
touchConfiguration();
localElementTicker.schedule(new MarkPostKnown(post), 10, TimeUnit.SECONDS);
return post;