Skip to content

Commit

Permalink
✨ feat: sendPoll quote msg. single select by default #3045
Browse files Browse the repository at this point in the history
  • Loading branch information
smashah committed Feb 10, 2023
1 parent 7b7483d commit 46b432f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/api/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1986,17 +1986,21 @@ public async testCallback(callbackToTest: SimpleListener, testData: any) : Prom
* @param to chat id - a group chat is required
* @param name the name of the poll
* @param options an array of poll options
* @param quotedMsgId A message to quote when sending the poll
* @param allowMultiSelect Whether or not to allow multiple selections. default false
*/
public async sendPoll(
to: GroupChatId,
name: string,
options: string[]
options: string[],
quotedMsgId ?: MessageId,
allowMultiSelect ?: boolean
) : Promise<MessageId> {
return await this.pup(
({ to, name, options }) => {
return WAPI.sendPoll(to, name, options );
({ to, name, options , quotedMsgId, allowMultiSelect }) => {
return WAPI.sendPoll(to, name, options, quotedMsgId, allowMultiSelect );
},
{ to, name, options }
{ to, name, options, quotedMsgId, allowMultiSelect }
)
}

Expand Down

0 comments on commit 46b432f

Please sign in to comment.