Skip to content

Commit

Permalink
Merge pull request #2 from fgiova/hotfix/fix-default-timewait-on-receive
Browse files Browse the repository at this point in the history
fix: fix default time wait on receive command
  • Loading branch information
fgiova committed Nov 17, 2023
2 parents 9c42d30 + 874c4f3 commit 6ffee2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ export class MiniSQSClient {

async receiveMessage (queueARN: string, receiveMessage: ReceiveMessage, clientClass = Client) {
const {region, accountId, queueName, host, endpoint} = this.getQueueARN(queueARN);
receiveMessage.WaitTimeSeconds = receiveMessage.WaitTimeSeconds > 20 || !receiveMessage.WaitTimeSeconds ? 20 : receiveMessage.WaitTimeSeconds;
const receiveBody = JSON.stringify({
...receiveMessage,
WaitTimeSeconds: receiveMessage.WaitTimeSeconds > 20 ? 20 : receiveMessage.WaitTimeSeconds
...receiveMessage
});
const requestData: HttpRequest = await this.signer.request({
method: "POST",
Expand Down

0 comments on commit 6ffee2d

Please sign in to comment.