Skip to content

broadcast notification in direct message problem too-many-requests #14

@MonsieurPatate

Description

@MonsieurPatate

I'm trying to send broadcast notification in direct message via bot (bot repository):

const { driver } = require('@rocket.chat/sdk');

module.exports = (robot) => {
    robot.respond(/notify/i, (msg) => {
        let userNames = ['1','2','3'];
        userNames.forEach(userName => driver.sendDirectToUser(message, userName));
    }
}

In the administration panel I turned off all rate limiters, but every time I get an exception :

ERROR [createDirectMessage] Error: {
isClientSafe: true,
error: 'too-many-requests',
reason: 'Error, too many requests. Please slow down. You must wait 54 seconds before trying again.',
details: { timeToReset: 53009 },
message: 'Error, too many requests. Please slow down. You must wait 54 seconds before trying again. [too-many-requests]',
errorType: 'Meteor.Error'
}

I have about 2000 users and I don't think that it should be a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions