From c17a55fbca5f1cbe0fbf7aac6b862eb47d01cb4f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 May 2023 14:55:37 +0200 Subject: Support handles starting with @ --- .../app/shared/shared-user-subscription/remote-subscribe.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts b/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts index 61bcd5345..295b0812a 100644 --- a/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts +++ b/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts @@ -35,7 +35,9 @@ export class RemoteSubscribeComponent extends FormReactive implements OnInit { } formValidated () { - const address = this.form.value['text'] + let address = this.form.value['text'] || '' + address = address.replace(/^@/, '') + const [ username, hostname ] = address.split('@') const protocol = window.location.protocol -- cgit v1.2.3