Open lemonspb opened 4 years ago
Hello. Are you talking about desktop notifications?
yes, the question is rather what event should I listen to for push
There aren't any globally visible events you can listen to yet. I can add something in the future to emit events for notifications.
here i found a pretty simple solution
sendingPushNotifications = (event) => {
if (event.event.type === "m.room.message"
&& event.event.sender !== this.props.userId
&& document.hidden) {
addNotification({
title: `сообщение от ${event.sender.rawDisplayName}`,
message: `${event.event.content.body}`,
theme: 'darkblue',
native: true
});
}
};
Hi, is there a simple way to set up push notification through your app?