summaryrefslogtreecommitdiff
path: root/src/client/app/common/views
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-11-04 20:44:05 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-11-04 20:44:05 +0900
commit072bc2d9fbecefdb8d3b1d72c9c920ac39ef96a0 (patch)
tree73277fb8c04bb982e5554da31045ce98a52474ed /src/client/app/common/views
parentImprove reaction setting (diff)
parentFix #5552 (#5579) (diff)
downloadsharkey-072bc2d9fbecefdb8d3b1d72c9c920ac39ef96a0.tar.gz
sharkey-072bc2d9fbecefdb8d3b1d72c9c920ac39ef96a0.tar.bz2
sharkey-072bc2d9fbecefdb8d3b1d72c9c920ac39ef96a0.zip
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/client/app/common/views')
-rw-r--r--src/client/app/common/views/pages/follow.vue39
1 files changed, 34 insertions, 5 deletions
diff --git a/src/client/app/common/views/pages/follow.vue b/src/client/app/common/views/pages/follow.vue
index f08ddf2642..4a01affa8a 100644
--- a/src/client/app/common/views/pages/follow.vue
+++ b/src/client/app/common/views/pages/follow.vue
@@ -72,11 +72,40 @@ export default Vue.extend({
const acct = new URL(location.href).searchParams.get('acct');
this.fetching = true;
Progress.start();
- this.$root.api('users/show', parseAcct(acct)).then(user => {
- this.user = user;
- this.fetching = false;
- Progress.done();
- });
+ if (acct.match(/^https?:/)) {
+ this.$root.api('ap/show', {
+ uri: acct
+ }).then((res: { type: string, object: any }) => {
+ if (res.type !== 'User') {
+ this.$root.dialog({
+ type: 'error',
+ text: 'acct is not an user'
+ });
+ } else {
+ this.user = res.object;
+ }
+ }).catch((e: any) => {
+ this.$root.dialog({
+ type: 'error',
+ text: e.message
+ });
+ }).finally(() => {
+ this.fetching = false;
+ Progress.done();
+ });
+ } else {
+ this.$root.api('users/show', parseAcct(acct)).then((user: any) => {
+ this.user = user;
+ }).catch((e: any) => {
+ this.$root.dialog({
+ type: 'error',
+ text: e.message
+ });
+ }).finally(() => {
+ this.fetching = false;
+ Progress.done();
+ });
+ }
},
async onClick() {