Skip to content

Commit 56cabda

Browse files
authored
fix: add push v3 params to channel apis (#1580)
1 parent 8434c42 commit 56cabda

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/channel.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import type {
6262
SearchPayload,
6363
SendMessageAPIResponse,
6464
SendMessageOptions,
65+
SendReactionOptions,
6566
TruncateChannelAPIResponse,
6667
TruncateOptions,
6768
UpdateChannelAPIResponse,
@@ -420,7 +421,7 @@ export class Channel {
420421
async sendReaction(
421422
messageID: string,
422423
reaction: Reaction,
423-
options?: { enforce_unique?: boolean; skip_push?: boolean },
424+
options?: SendReactionOptions,
424425
) {
425426
if (!messageID) {
426427
throw Error(`Message id is missing`);
@@ -464,7 +465,7 @@ export class Channel {
464465
async _sendReaction(
465466
messageID: string,
466467
reaction: Reaction,
467-
options?: { enforce_unique?: boolean; skip_push?: boolean },
468+
options?: SendReactionOptions,
468469
) {
469470
if (!messageID) {
470471
throw Error(`Message id is missing`);

src/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,6 +2750,12 @@ export type SendMessageOptions = {
27502750

27512751
export type UpdateMessageOptions = {
27522752
skip_enrich_url?: boolean;
2753+
skip_push?: boolean;
2754+
};
2755+
2756+
export type SendReactionOptions = {
2757+
enforce_unique?: boolean;
2758+
skip_push?: boolean;
27532759
};
27542760

27552761
export type GetMessageOptions = {
@@ -2841,6 +2847,7 @@ export type Reaction = CustomReactionData & {
28412847
score?: number;
28422848
user?: UserResponse | null;
28432849
user_id?: string;
2850+
emoji_code?: string;
28442851
};
28452852

28462853
export type Resource =

0 commit comments

Comments
 (0)