From ef0b9ebc3fbe8a0765e3ee9dda7c901f4a2bb67c Mon Sep 17 00:00:00 2001 From: assaf Date: Sun, 8 Oct 2017 19:09:02 -0700 Subject: [PATCH] don't send a notification for own messages --- App.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/App.js b/App.js index 51438ab..7d7d422 100644 --- a/App.js +++ b/App.js @@ -192,12 +192,14 @@ export default class App extends React.Component { if (!isRefresh && this.state.firstItem != -1) { newMessages.forEach(m => { - var title = "~" + this.urbit.formatShip(m.sender, true) - // merge sub messages for the item - var body = "" - m.messages.forEach(sub => body += sub["text"]) - var iconUrl = this.getAvatarUrl(m) - this.presentNotification(title, body, iconUrl) + if (m.sender != this.state.user) { + var title = "~" + this.urbit.formatShip(m.sender, true) + // merge sub messages for the item + var body = "" + m.messages.forEach(sub => body += sub["text"]) + var iconUrl = this.getAvatarUrl(m) + this.presentNotification(title, body, iconUrl) + } }) }