mirror of
https://github.com/block-core/blockcore-notes.git
synced 2024-09-29 06:20:42 +00:00
Fix bug with links on notifications
- Fix "note" link on notifications which was not linking correctly. - Fix the "Replying to" links.
This commit is contained in:
parent
f825f8ca3e
commit
a500d475b8
@ -276,6 +276,9 @@ export interface NotificationModel {
|
||||
/** The event ID of the notification */
|
||||
id: string;
|
||||
|
||||
/** The ID of event a reaction responds to. */
|
||||
relatedId?: string;
|
||||
|
||||
pubkey: string;
|
||||
|
||||
message: string;
|
||||
|
@ -456,8 +456,11 @@ export class RelayService {
|
||||
msg = `Event kind ${event.kind} notification.`;
|
||||
}
|
||||
|
||||
const lastETag = this.eventService.lastETag(event);
|
||||
|
||||
notification = {
|
||||
id: event.id!,
|
||||
relatedId: lastETag,
|
||||
kind: event.kind,
|
||||
pubkey: event.pubkey,
|
||||
message: msg,
|
||||
|
@ -2,5 +2,5 @@
|
||||
<span *ngIf="notification.kind > 7"> {{ notification.message }}</span>
|
||||
<span *ngIf="notification.kind == 1"> replied to your <a [routerLink]="['/e', notification.id]">note</a>.</span>
|
||||
<span *ngIf="notification.kind == 3"> started following you.</span>
|
||||
<span *ngIf="notification.kind == 6"> boosted your <a [routerLink]="['/e', notification.id]">note</a></span>
|
||||
<span *ngIf="notification.kind == 7"> reacted with {{notification.message}} to your <a [routerLink]="['/e', notification.id]">note</a>.</span>
|
||||
<span *ngIf="notification.kind == 6"> boosted your <a [routerLink]="['/e', notification.relatedId]">note</a></span>
|
||||
<span *ngIf="notification.kind == 7"> reacted with {{notification.message}} to your <a [routerLink]="['/e', notification.relatedId]">note</a>.</span>
|
||||
|
@ -32,7 +32,7 @@ export class ReplyListComponent {
|
||||
const profile = await this.profileService.getProfile(key);
|
||||
|
||||
if (profile) {
|
||||
this.profiles.push({ pubkey: profile.pubKey, name: profile.name });
|
||||
this.profiles.push({ pubkey: profile.pubkey, name: profile.name });
|
||||
} else {
|
||||
this.profiles.push({ pubkey: key, name: key });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user