-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use service worker to display notifications if available #1580
Conversation
src/cleanIrcMessage.js
Outdated
"use strict"; | ||
|
||
// TODO: This does not strip hex based colours | ||
module.exports = (message) => message.replace(/\x02|\x1D|\x1F|\x16|\x0F|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?/g, "").trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails on Node 8:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sure am glad we run production builds in our CI!
According to https://stackoverflow.com/questions/43888474/unexpected-token-operator-from-uglifyjs, Webpack relies on a version that doesn't support ES6 yet, so hopefully by the time this PR gets merged, they will be done (?).
I'm really surprised why this arrives only now though, since that's not the first fat-arrow function we use on the server...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was because src
folder wasn't included in babel transpiling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add the src
though? I don't know, I feel odd about that. We have client code we use on the server and now server code we use on the client :/
Also does that mean more gets added to the client bundle? I compared and it doesn't seem to any extra kb heavier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could move this file to client (and reference it on the server like we already do with findLinks) instead, this will at least keep the consistency in this regard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems doing yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine*
Damn, 1.5month to notice my typo...
1bb3d5e
to
d7c6163
Compare
"use strict"; | ||
|
||
// TODO: This does not strip hex based colours - issue #1413 | ||
module.exports = (message) => message.replace(/\x02|\x1D|\x1F|\x16|\x0F|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?/g, "").trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add this file to .npmignore
now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
d7c6163
to
d89c26a
Compare
Rebased on master and fixed conflicts (ESLint stuff only). |
d89c26a
to
0402554
Compare
Displays notifications if the client is active on mobile devices (new Notification fails there)