Skip to content

Commit eeea4ec

Browse files
fix(backend): 招待コード発行可能残り数算出に使用すべきロールポリシーの値が違うのを修正 (#14834)
* fix: should use invite limit cycle to calculate invite/limit * Update Changelog * Update changelog --------- Co-authored-by: Lhc_fl <lhcfl@outlook.com>
1 parent 07b2c3e commit eeea4ec

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
### Server
2323
- Fix: Nested proxy requestsを検出した際にブロックするように
2424
[ghsa-gq5q-c77c-v236](https://github.com/misskey-dev/misskey/security/advisories/ghsa-gq5q-c77c-v236)
25+
- Fix: 招待コードの発行可能な残り数算出に使用すべきロールポリシーの値が違う問題を修正
26+
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/706)
2527

2628
## 2024.10.1
2729

packages/backend/src/server/api/endpoints/invite/limit.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
4949
const policies = await this.roleService.getUserPolicies(me.id);
5050

5151
const count = policies.inviteLimit ? await this.registrationTicketsRepository.countBy({
52-
id: MoreThan(this.idService.gen(Date.now() - (policies.inviteExpirationTime * 60 * 1000))),
52+
id: MoreThan(this.idService.gen(Date.now() - (policies.inviteLimitCycle * 60 * 1000))),
5353
createdById: me.id,
5454
}) : null;
5555

0 commit comments

Comments
 (0)