summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/AccountUpdateService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-12-04 15:03:09 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-12-04 15:03:09 +0900
commitbbb49457f9fb5d46402e913c92ebf77722cad6ff (patch)
tree8ef285bcbab2c3a4a89d0a624a802d76a2864fed /packages/backend/src/core/AccountUpdateService.ts
parent:art: (diff)
downloadsharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.tar.gz
sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.tar.bz2
sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.zip
refactor: introduce bindThis decorator to bind this automaticaly
Diffstat (limited to 'packages/backend/src/core/AccountUpdateService.ts')
-rw-r--r--packages/backend/src/core/AccountUpdateService.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/backend/src/core/AccountUpdateService.ts b/packages/backend/src/core/AccountUpdateService.ts
index a5ab4fdfce..5f6dfca0ca 100644
--- a/packages/backend/src/core/AccountUpdateService.ts
+++ b/packages/backend/src/core/AccountUpdateService.ts
@@ -7,6 +7,7 @@ import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { RelayService } from '@/core/RelayService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
+import { bindThis } from '@/decorators.js';
@Injectable()
export class AccountUpdateService {
@@ -24,6 +25,7 @@ export class AccountUpdateService {
) {
}
+ @bindThis
public async publishToFollowers(userId: User['id']) {
const user = await this.usersRepository.findOneBy({ id: userId });
if (user == null) throw new Error('user not found');