aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-10-30 17:09:47 +0000
committerr <r@freesoftwareextremist.com>2020-10-30 17:09:47 +0000
commit471e73d200074cbd3a06edec5d0bb8c271665aac (patch)
tree9369b430ccd45666e51ef4853cb0a1dfe2d58ff3
parent140dfe2f638e755fa137995a29f2f44aa0b8c310 (diff)
downloadbloat-471e73d200074cbd3a06edec5d0bb8c271665aac.tar.gz
bloat-471e73d200074cbd3a06edec5d0bb8c271665aac.zip
Avoid unnecessary API call on thread page
-rw-r--r--service/service.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/service/service.go b/service/service.go
index b418921..48aafda 100644
--- a/service/service.go
+++ b/service/service.go
@@ -300,19 +300,14 @@ func (svc *service) ServeThreadPage(c *model.Client, id string, reply bool) (err
return
}
- u, err := c.GetAccountCurrentUser(ctx)
- if err != nil {
- return
- }
-
if reply {
var content string
var visibility string
- if u.ID != status.Account.ID {
+ if c.Session.UserID != status.Account.ID {
content += "@" + status.Account.Acct + " "
}
for i := range status.Mentions {
- if status.Mentions[i].ID != u.ID &&
+ if status.Mentions[i].ID != c.Session.UserID &&
status.Mentions[i].ID != status.Account.ID {
content += "@" + status.Mentions[i].Acct + " "
}