mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-12-24 14:39:48 +00:00
Avoid unnecessary API call on thread page
This commit is contained in:
parent
140dfe2f63
commit
471e73d200
@ -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 New Issue
Block a user