mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
feat(reports): add server-driven report flows (#3330)
This commit is contained in:
1 parent
bc17922b02
commit
ece622e800
471 files changed
+56262
-35932
No files matched your search
@@ -8,7 +8,6 @@ import {
|
||||
type CrosspostPropagation,
|
||||
createCrosspostRateLimitError,
|
||||
isCrosspostedMessage,
|
||||
withPeekRetryAfter,
|
||||
} from '@app/api/channel/services/message/CrosspostPropagation';
|
||||
import type {MessageChannelAuthService} from '@app/api/channel/services/message/MessageChannelAuthService';
|
||||
import type {MessageDispatchService} from '@app/api/channel/services/message/MessageDispatchService';
|
||||
@@ -189,11 +188,8 @@ export class MessageCrosspostService {
|
||||
private async assertBudgetAvailable(channelId: ChannelID): Promise<void> {
|
||||
const config = this.channelBudgetConfig(channelId);
|
||||
const peek = await this.deps.rateLimitService.peekLimit(config);
|
||||
if (peek.remaining < 1) {
|
||||
throw createCrosspostRateLimitError(
|
||||
APIErrorCodes.MESSAGE_CROSSPOST_RATE_LIMITED,
|
||||
withPeekRetryAfter(peek, config),
|
||||
);
|
||||
if (!peek.allowed) {
|
||||
throw createCrosspostRateLimitError(APIErrorCodes.MESSAGE_CROSSPOST_RATE_LIMITED, peek);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user