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>
This commit is contained in:
parent
07b2c3e5b2
commit
eeea4ec00b
|
@ -22,6 +22,8 @@
|
|||
### Server
|
||||
- Fix: Nested proxy requestsを検出した際にブロックするように
|
||||
[ghsa-gq5q-c77c-v236](https://github.com/misskey-dev/misskey/security/advisories/ghsa-gq5q-c77c-v236)
|
||||
- Fix: 招待コードの発行可能な残り数算出に使用すべきロールポリシーの値が違う問題を修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/706)
|
||||
|
||||
## 2024.10.1
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const policies = await this.roleService.getUserPolicies(me.id);
|
||||
|
||||
const count = policies.inviteLimit ? await this.registrationTicketsRepository.countBy({
|
||||
id: MoreThan(this.idService.gen(Date.now() - (policies.inviteExpirationTime * 60 * 1000))),
|
||||
id: MoreThan(this.idService.gen(Date.now() - (policies.inviteLimitCycle * 60 * 1000))),
|
||||
createdById: me.id,
|
||||
}) : null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue