Prevent posting a message to yourself.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Post.java
index 21ba42d..964a054 100644 (file)
@@ -159,7 +159,9 @@ public class Post {
         * @return This post (for method chaining)
         */
        public Post setRecipient(Sone recipient) {
-               this.recipient = recipient;
+               if (!sone.equals(recipient)) {
+                       this.recipient = recipient;
+               }
                return this;
        }