Skip to content
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

Webpush notification #3273

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vedant-jain03
Copy link
Member

Fixes #3271

Describe the changes you have made in this PR -

  • Added service worker.
  • Added noticed delivery method for web push.
  • Added web push notifications.

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

@vedant-jain03 vedant-jain03 added the GSoC'22 Label for Google Summer of Code 2022 PR's and Issues related. label Aug 31, 2022
@vedant-jain03 vedant-jain03 added this to the Platform Improvement milestone Aug 31, 2022
@vedant-jain03 vedant-jain03 self-assigned this Aug 31, 2022
@coveralls
Copy link

coveralls commented Aug 31, 2022

Coverage Status

Coverage decreased (-0.06%) to 81.687% when pulling 3303926 on vedant-jain03:webpush_notification into c161d5a on CircuitVerse:master.

app/controllers/projects_controller.rb Outdated Show resolved Hide resolved
else
render json: @subscription.errors, status: :unprocessable_entity
is_subscribed = PushSubscription.find_by(auth: params[:keys][:auth])
if !is_subscribed
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a guard clause (return unless !is_subscribed) instead of wrapping the code inside a conditional expression.

else
render json: @subscription.errors, status: :unprocessable_entity
is_subscribed = PushSubscription.find_by(auth: params[:keys][:auth])
if !is_subscribed
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Favor unless over if for negative conditions.

app/models/project.rb Outdated Show resolved Hide resolved
app/models/star.rb Outdated Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Sep 7, 2022

Code Climate has analyzed commit 6583b0c and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 2

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC'22 Label for Google Summer of Code 2022 PR's and Issues related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: web push notification
2 participants