{"action":"created","issue":{"url":"https://api.github.com/repos/blainesch/electron-notifications/issues/25","repository_url":"https://api.github.com/repos/blainesch/electron-notifications","labels_url":"https://api.github.com/repos/blainesch/electron-notifications/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/blainesch/electron-notifications/issues/25/comments","events_url":"https://api.github.com/repos/blainesch/electron-notifications/issues/25/events","html_url":"https://github.com/blainesch/electron-notifications/issues/25","id":213282714,"number":25,"title":"How to send data back to container in electron-react-boilerplate?","user":{"login":"vjtc0n","id":13517057,"avatar_url":"https://avatars0.githubusercontent.com/u/13517057?v=3","gravatar_id":"","url":"https://api.github.com/users/vjtc0n","html_url":"https://github.com/vjtc0n","followers_url":"https://api.github.com/users/vjtc0n/followers","following_url":"https://api.github.com/users/vjtc0n/following{/other_user}","gists_url":"https://api.github.com/users/vjtc0n/gists{/gist_id}","starred_url":"https://api.github.com/users/vjtc0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjtc0n/subscriptions","organizations_url":"https://api.github.com/users/vjtc0n/orgs","repos_url":"https://api.github.com/users/vjtc0n/repos","events_url":"https://api.github.com/users/vjtc0n/events{/privacy}","received_events_url":"https://api.github.com/users/vjtc0n/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-10T09:03:45Z","updated_at":"2017-03-10T12:38:35Z","closed_at":null,"body":"In electron-react-boilerplate, I follow your code to this:\r\n\r\nipcMain.on('reminders', (event, arg) => {\r\n    console.log(\"Attempting to create notification\");\r\n    const notification = notifier.notify('Calendar', arg)\r\n    notification.on('buttonClicked', (text, buttonIndex, options) => {\r\n      if (text === 'Snooze') {\r\n        console.log(\"Snooze!\")\r\n      }\r\n      notification.close()\r\n    })\r\n  });\r\n\r\nIn my Container, I want to press a button, then showing the Notification, here is the code:\r\n\r\nclass ContainerA extends Component {\r\n  onPress() {\r\n    notifier('reminders', {\r\n      message: 'Event begins in 10 minutes',\r\n      icon: 'http://cl.ly/J49B/3951818241085781941.png',\r\n      buttons: ['Dismiss', 'Snooze'],\r\n      duration: 30000\r\n    });\r\n  }\r\n  \r\n  render() {}\r\n}\r\n\r\nHow can my container know which buttons I pressed ?\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/blainesch/electron-notifications/issues/comments/285659096","html_url":"https://github.com/blainesch/electron-notifications/issues/25#issuecomment-285659096","issue_url":"https://api.github.com/repos/blainesch/electron-notifications/issues/25","id":285659096,"user":{"login":"cgerikj","id":6907023,"avatar_url":"https://avatars3.githubusercontent.com/u/6907023?v=3","gravatar_id":"","url":"https://api.github.com/users/cgerikj","html_url":"https://github.com/cgerikj","followers_url":"https://api.github.com/users/cgerikj/followers","following_url":"https://api.github.com/users/cgerikj/following{/other_user}","gists_url":"https://api.github.com/users/cgerikj/gists{/gist_id}","starred_url":"https://api.github.com/users/cgerikj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgerikj/subscriptions","organizations_url":"https://api.github.com/users/cgerikj/orgs","repos_url":"https://api.github.com/users/cgerikj/repos","events_url":"https://api.github.com/users/cgerikj/events{/privacy}","received_events_url":"https://api.github.com/users/cgerikj/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T12:38:35Z","updated_at":"2017-03-10T12:38:35Z","body":"notification.on('buttonClicked', (text, buttonIndex, options) => \r\n\r\nThe text variable contains the text of the pressed button and buttonIndex contains its index (0, 1, etc)"}}
{"actor":{"display_login":"cgerikj"}}