fix account URI in remote comment modal

pull/1196/head
Rigel Kent 2018-10-04 14:13:08 +02:00
parent d0ae9490a3
commit 6d5973fa0e
No known key found for this signature in database
GPG Key ID: EA12971B0E438F36
2 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,7 @@
<span i18n> <span i18n>
If you have an account on Mastodon or Pleroma, you can open it directly in their interface: If you have an account on Mastodon or Pleroma, you can open it directly in their interface:
</span> </span>
<my-remote-subscribe [interact]="true" account="{{ uri }}"></my-remote-subscribe> <my-remote-subscribe [interact]="true" account="{{ getUrl() }}"></my-remote-subscribe>
</div> </div>
<div class="modal-footer inputs"> <div class="modal-footer inputs">
<span i18n class="action-button action-button-cancel" role="button" (click)="hideVisitorModal()"> <span i18n class="action-button action-button-cancel" role="button" (click)="hideVisitorModal()">

View File

@ -127,6 +127,10 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
return this.form.value['text'] return this.form.value['text']
} }
getUrl () {
return window.location.href
}
getAvatarUrl () { getAvatarUrl () {
if (this.user) return this.user.accountAvatarUrl if (this.user) return this.user.accountAvatarUrl
return window.location.origin + '/client/assets/images/default-avatar.png' return window.location.origin + '/client/assets/images/default-avatar.png'