Skip to content

Commit

Permalink
don't send a notification for own messages
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Oct 9, 2017
1 parent f84fd37 commit ef0b9eb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
}

Expand Down

0 comments on commit ef0b9eb

Please sign in to comment.