-
- switchToDefaultAvatar ($event: Event) {
- ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL()
- }
-
- unblockAccount (accountBlock: AccountBlock) {
- const blockedAccount = accountBlock.blockedAccount
-
- this.blocklistService.unblockAccountByInstance(blockedAccount)
- .subscribe(
- () => {
- this.notifier.success(
- this.i18n('Account {{nameWithHost}} unmuted by your instance.', { nameWithHost: blockedAccount.nameWithHost })
- )
-
- this.loadData()
- }
- )
- }
-
- protected loadData () {
- return this.blocklistService.getInstanceAccountBlocklist({
- pagination: this.pagination,
- sort: this.sort,
- search: this.search
- })
- .subscribe(
- resultList => {
- this.blockedAccounts = resultList.data
- this.totalRecords = resultList.total
- },
-
- err => this.notifier.error(err.message)
- )
- }