Only allow unshelling a post if its Sone is not a shell.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 12:42:47 +0000 (14:42 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 12:42:47 +0000 (14:42 +0200)
src/main/java/net/pterodactylus/sone/data/PostShell.java

index 7bcddfa..b0cb8e6 100644 (file)
@@ -199,7 +199,7 @@ public class PostShell extends Post implements Shell<Post> {
         */
        @Override
        public boolean canUnshell() {
-               return (id != null) && (sone != null) && (time != null) && (text != null);
+               return (id != null) && (sone != null) && (!(sone instanceof Shell<?>)) && (time != null) && (text != null);
        }
 
        /**