mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-25 21:31:27 +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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
u, err := c.GetAccountCurrentUser(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if reply {
|
if reply {
|
||||||
var content string
|
var content string
|
||||||
var visibility string
|
var visibility string
|
||||||
if u.ID != status.Account.ID {
|
if c.Session.UserID != status.Account.ID {
|
||||||
content += "@" + status.Account.Acct + " "
|
content += "@" + status.Account.Acct + " "
|
||||||
}
|
}
|
||||||
for i := range status.Mentions {
|
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 {
|
status.Mentions[i].ID != status.Account.ID {
|
||||||
content += "@" + status.Mentions[i].Acct + " "
|
content += "@" + status.Mentions[i].Acct + " "
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue