mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
		
						commit
						072bc2d9fb
					
				
					 1 changed files with 34 additions and 5 deletions
				
			
		| 
						 | 
					@ -72,11 +72,40 @@ export default Vue.extend({
 | 
				
			||||||
			const acct = new URL(location.href).searchParams.get('acct');
 | 
								const acct = new URL(location.href).searchParams.get('acct');
 | 
				
			||||||
			this.fetching = true;
 | 
								this.fetching = true;
 | 
				
			||||||
			Progress.start();
 | 
								Progress.start();
 | 
				
			||||||
			this.$root.api('users/show', parseAcct(acct)).then(user => {
 | 
								if (acct.match(/^https?:/)) {
 | 
				
			||||||
				this.user = user;
 | 
									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;
 | 
										this.fetching = false;
 | 
				
			||||||
					Progress.done();
 | 
										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() {
 | 
							async onClick() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue