Skip to content

Commit 99b25df

Browse files
committed
Don't send activites to the sender server
1 parent f7c7356 commit 99b25df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/session-impl.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,13 @@ export class SessionImpl<TContextData> implements Session<TContextData> {
152152
} while (await kv.get(lockKey) !== id);
153153
const preferSharedInbox = visibility === "public" ||
154154
visibility === "unlisted" || visibility === "followers";
155+
const excludeBaseUris = [new URL(this.context.origin)];
155156
if (preferSharedInbox) {
156157
await this.context.sendActivity(
157158
this.bot,
158159
"followers",
159160
activity,
160-
{ preferSharedInbox },
161+
{ preferSharedInbox, excludeBaseUris },
161162
);
162163
}
163164
if (mentionedActorIds.length > 0) {
@@ -184,7 +185,7 @@ export class SessionImpl<TContextData> implements Session<TContextData> {
184185
this.bot,
185186
mentionedActors,
186187
activity,
187-
{ preferSharedInbox },
188+
{ preferSharedInbox, excludeBaseUris },
188189
);
189190
}
190191
return await createMessage(msg, this, options.replyTarget);

0 commit comments

Comments
 (0)