Remove duplicate inboxes when constructing OutgoingActivity
This commit is contained in:
parent
4d31b9f9f9
commit
f2df270a82
|
@ -208,8 +208,10 @@ impl OutgoingActivity {
|
||||||
activity: impl Serialize,
|
activity: impl Serialize,
|
||||||
recipients: Vec<Actor>,
|
recipients: Vec<Actor>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let inboxes = recipients.into_iter()
|
let mut inboxes: Vec<String> = recipients.into_iter()
|
||||||
.map(|actor| actor.inbox).collect();
|
.map(|actor| actor.inbox).collect();
|
||||||
|
inboxes.sort();
|
||||||
|
inboxes.dedup();
|
||||||
Self {
|
Self {
|
||||||
instance: instance.clone(),
|
instance: instance.clone(),
|
||||||
sender: sender.clone(),
|
sender: sender.clone(),
|
||||||
|
|
Loading…
Reference in a new issue