From 9761581a4250dc4ef276ffb74f0031d7d1fd0620 Mon Sep 17 00:00:00 2001 From: Snowyfox Date: Sat, 23 Apr 2022 10:28:29 -0400 Subject: [PATCH] Fixed self detection in compose window --- PostWindow.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PostWindow.java b/PostWindow.java index 83c0bc9..5f6203b 100755 --- a/PostWindow.java +++ b/PostWindow.java @@ -245,9 +245,10 @@ implements ActionListener { String authorId = post.get("account").get("acct").value; String postId = post.get("id").value; String cw = post.get("spoiler_text").value; - String ourId = api.getAccountDetails().get("acct").value; - boolean replying = authorId != ourId; + String id1 = post.get("account").get("id").value; + String id2 = api.getAccountDetails().get("id").value; + String vs = post.get("visibility").value; PostVisibility v = null; if (vs.equals("public")) v = PostVisibility.PUBLIC; @@ -257,7 +258,7 @@ implements ActionListener { Composition c = new Composition(); c.contentWarning = cw; - c.text = replying ? "@" + authorId + " " : ""; + c.text = id1.equals(id2) ? "" : "@" + authorId + " "; c.visibility = v; c.replyToPostId = postId;