mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-06 03:48:45 +00:00
Added view pinned statuses in accounts
This commit is contained in:
parent
b07793e986
commit
ca99d0a789
3 changed files with 23 additions and 4 deletions
|
@ -610,7 +610,7 @@ func (s *service) UserPage(c *client, id string, pageType string,
|
|||
|
||||
switch pageType {
|
||||
case "":
|
||||
statuses, err = c.GetAccountStatuses(c.ctx, id, false, &pg)
|
||||
statuses, err = c.GetAccountStatuses(c.ctx, id, false, false, &pg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ func (s *service) UserPage(c *client, id string, pageType string,
|
|||
id, pg.MaxID)
|
||||
}
|
||||
case "media":
|
||||
statuses, err = c.GetAccountStatuses(c.ctx, id, true, &pg)
|
||||
statuses, err = c.GetAccountStatuses(c.ctx, id, true, false, &pg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -645,6 +645,15 @@ func (s *service) UserPage(c *client, id string, pageType string,
|
|||
nextLink = fmt.Sprintf("/user/%s/media?max_id=%s",
|
||||
id, pg.MaxID)
|
||||
}
|
||||
case "pinned":
|
||||
statuses, err = c.GetAccountStatuses(c.ctx, id, false, true, &pg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if len(statuses) == 20 && len(pg.MaxID) > 0 {
|
||||
nextLink = fmt.Sprintf("/user/%s/pinned?max_id=%s",
|
||||
id, pg.MaxID)
|
||||
}
|
||||
case "bookmarks":
|
||||
if !isCurrent {
|
||||
return errInvalidArgument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue