Skip to content

Commit

Permalink
feat: Now WPP.chat.sendFileMessage auto detect the content
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Nov 15, 2021
1 parent b810b2a commit 09ce7e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/chat/Chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ export class Chat extends Emittery<ChatEventTypes> {
options = {
...this.defaultSendMessageOptions,
...{
type: 'document',
type: 'auto-detect',
},
...options,
};
Expand Down
4 changes: 4 additions & 0 deletions src/chat/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export interface FileMessageOptions extends SendMessageOptions {
mimetype?: string;
}

export interface AutoDetectMessageOptions extends FileMessageOptions {
type: 'auto-detect';
}

export interface AudioMessageOptions extends FileMessageOptions {
type: 'audio';
isPtt?: boolean;
Expand Down

0 comments on commit 09ce7e3

Please sign in to comment.