Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enhanced type definition for recipients of the sendFile method #2357

Merged
merged 2 commits into from
Oct 24, 2024
Merged
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
9 changes: 6 additions & 3 deletions src/api/layers/sender.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
stickerSelect,
} from '../helpers';
import { filenameFromMimeType } from '../helpers/filename-from-mimetype';
import { Message, SendFileResult, SendStickerResult } from '../model';
import { Message, SendFileResult, SendStickerResult, Wid } from '../model';
import { ChatState } from '../model/enum';
import { ListenerLayer } from './listener.layer';
import {
Expand Down Expand Up @@ -569,7 +569,10 @@ export class SenderLayer extends ListenerLayer {
*
* @example
* ```javascript
* // Simple message
* // File message from a path
* client.sendFile('<number>@c.us', './someFile.txt');
* // Simple message from base64
*
* client.sendFile('<number>@c.us', 'data:text/plain;base64,V1BQQ29ubmVjdA==');
*
* // With buttons
Expand Down Expand Up @@ -604,7 +607,7 @@ export class SenderLayer extends ListenerLayer {
* @param options
*/
public async sendFile(
to: string,
to: string | Wid,
pathOrBase64: string,
options?: FileMessageOptions
);
Expand Down
Loading