Skip to content

Commit

Permalink
Inherit the original message's visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Jan 8, 2025
1 parent face3e5 commit 166bb93
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/message-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ export class MessageImpl<T extends MessageClass, TContextData>
| SessionPublishOptions
| SessionPublishOptionsWithClass<MessageClass>,
): Promise<Message<MessageClass, TContextData>> {
return this.session.publish(text, { ...options, replyTo: this.id });
return this.session.publish(text, {
visibility: this.visibility === "unknown" ? "direct" : this.visibility,
...options,
replyTo: this.id,
});
}

async share(
Expand Down

0 comments on commit 166bb93

Please sign in to comment.