Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions packages/linejs/client/features/message/square.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ export class SquareMessage {
}

await this.#client.base.square.sendMessage({
relatedMessageId: this.raw.message.id,
relatedMessageId: input.relatedMessageId ?? this.raw.message.id,
squareChatMid: this.raw.message.to,
text: input.text,
contentType: input.contentType,
contentMetadata: input.contentMetadata,
location: input.location,
});
}

Expand All @@ -77,15 +80,18 @@ export class SquareMessage {
},
): Promise<void> {
if (typeof input === "string") {
return this.reply({
return this.send({
text: input,
});
}

await this.#client.base.square.sendMessage({
relatedMessageId: this.raw.message.to,
relatedMessageId: input.relatedMessageId,
squareChatMid: this.raw.message.to,
text: input.text,
contentMetadata: input.contentMetadata,
contentType: input.contentType,
location: input.location,
});
}
/**
Expand Down
11 changes: 9 additions & 2 deletions packages/linejs/client/features/message/talk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ export class TalkMessage {
to = this.isMyMessage ? this.to.id : this.from.id;
}
return await this.#client.base.talk.sendMessage({
relatedMessageId: this.raw.id,
relatedMessageId: input.relatedMessageId ?? this.raw.id,
text: input.text,
to,
e2ee: input.e2ee,
contentType: input.contentType,
contentMetadata: input.contentMetadata,
location: input.location,
});
}

Expand All @@ -85,7 +88,7 @@ export class TalkMessage {
},
): Promise<Message> {
if (typeof input === "string") {
return this.reply({
return this.send({
text: input,
});
}
Expand All @@ -98,9 +101,13 @@ export class TalkMessage {
to = this.isMyMessage ? this.to.id : this.from.id;
}
return await this.#client.base.talk.sendMessage({
relatedMessageId: input.relatedMessageId,
text: input.text,
to,
e2ee: input.e2ee,
contentType: input.contentType,
contentMetadata: input.contentMetadata,
location: input.location,
});
}

Expand Down