mirror of
https://git.freesoftwareextremist.com/bloat
synced 2024-12-22 09:10:42 +00:00
Avoid unnecessary API call on thread page
This commit is contained in:
parent
140dfe2f63
commit
471e73d200
1 changed files with 2 additions and 7 deletions
|
@ -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 + " "
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue