Fixed self detection in compose window

This commit is contained in:
Snowyfox 2022-04-23 10:28:29 -04:00
parent 117503c5f2
commit 9761581a42

View File

@ -245,8 +245,9 @@ 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;
@ -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;