我正在使用export class Component implements AfterViewInit {
@ViewChild('iframe') iframe: ElementRef
ngAfterViewInit() {
this.iframe.nativeElement.setAttribute('src', project.projectUrl);
}
}
来实现推送通知。我正在使用Twilio ID来设置配置。我能够从服务器端发送消息,我确实收到了消息
NodeJS
但是在客户端,我收到一个旧的弹出式通知,其中 notificationTitle 为
背景消息标题
和 身体为
背景消息正文。
。我确实收到带有自定义正文和标题的控制台日志:
{ message: 'Successful sending notification' }
但是弹出通知包含
messaging.onMessage((payload) => {
console.log('Message received. ', payload);
console.log(payload.data.twi_body);
console.log(payload.data.twi_title);
});
和
Background Message Title
。
在这方面的任何帮助将不胜感激。
谢谢!