From: David ‘Bombe’ Roden Date: Wed, 1 Dec 2010 07:02:47 +0000 (+0100) Subject: Prevent posting a message to yourself. X-Git-Tag: 0.3.2-RC4~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=812263335baaed451268d1f5bd9432ce37333834;p=Sone.git Prevent posting a message to yourself. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Post.java b/src/main/java/net/pterodactylus/sone/data/Post.java index 21ba42d..964a054 100644 --- a/src/main/java/net/pterodactylus/sone/data/Post.java +++ b/src/main/java/net/pterodactylus/sone/data/Post.java @@ -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; }