mirror of
https://github.com/writefreely/writefreely
synced 2025-02-26 03:37:11 +00:00
fix for Pubgate user not having SharedInbox
This commit is contained in:
parent
702db2bf75
commit
d8fa85432d
1 changed files with 14 additions and 6 deletions
|
@ -549,10 +549,14 @@ func deleteFederatedPost(app *app, p *PublicPost, collID int64) error {
|
||||||
|
|
||||||
inboxes := map[string][]string{}
|
inboxes := map[string][]string{}
|
||||||
for _, f := range *followers {
|
for _, f := range *followers {
|
||||||
if _, ok := inboxes[f.SharedInbox]; ok {
|
inbox := f.SharedInbox
|
||||||
inboxes[f.SharedInbox] = append(inboxes[f.SharedInbox], f.ActorID)
|
if inbox == "" {
|
||||||
|
inbox = f.Inbox
|
||||||
|
}
|
||||||
|
if _, ok := inboxes[inbox]; ok {
|
||||||
|
inboxes[inbox] = append(inboxes[inbox], f.ActorID)
|
||||||
} else {
|
} else {
|
||||||
inboxes[f.SharedInbox] = []string{f.ActorID}
|
inboxes[inbox] = []string{f.ActorID}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,10 +596,14 @@ func federatePost(app *app, p *PublicPost, collID int64, isUpdate bool) error {
|
||||||
|
|
||||||
inboxes := map[string][]string{}
|
inboxes := map[string][]string{}
|
||||||
for _, f := range *followers {
|
for _, f := range *followers {
|
||||||
if _, ok := inboxes[f.SharedInbox]; ok {
|
inbox := f.SharedInbox
|
||||||
inboxes[f.SharedInbox] = append(inboxes[f.SharedInbox], f.ActorID)
|
if inbox == "" {
|
||||||
|
inbox = f.Inbox
|
||||||
|
}
|
||||||
|
if _, ok := inboxes[inbox]; ok {
|
||||||
|
inboxes[inbox] = append(inboxes[inbox], f.ActorID)
|
||||||
} else {
|
} else {
|
||||||
inboxes[f.SharedInbox] = []string{f.ActorID}
|
inboxes[inbox] = []string{f.ActorID}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue