⚡️ Remove unnecessary database operation
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 30 Jul 2019 18:04:44 +0000 (20:04 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 30 Jul 2019 18:07:16 +0000 (20:07 +0200)
src/main/java/net/pterodactylus/sone/database/memory/MemoryPostBuilder.java

index dea3449..3c4b16a 100644 (file)
@@ -51,9 +51,7 @@ class MemoryPostBuilder extends AbstractPostBuilder {
        @Override
        public Post build() throws IllegalStateException {
                validate();
-               Post post = new MemoryPost(database, soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, recipientId, currentTime ? System.currentTimeMillis() : time, text);
-               post.setKnown(database.isPostKnown(post));
-               return post;
+               return new MemoryPost(database, soneProvider, randomId ? UUID.randomUUID().toString() : id, senderId, recipientId, currentTime ? System.currentTimeMillis() : time, text);
        }
 
 }