remove expired service connection notifications

This commit is contained in:
Georg Gadinger 2023-02-12 19:18:17 +01:00
parent 065d35c288
commit e1aee89be0
8 changed files with 8 additions and 30 deletions

View File

@ -1,4 +0,0 @@
# frozen_string_literal: true
class Notification::ServiceTokenExpired < Notification
end

View File

@ -1,4 +0,0 @@
# frozen_string_literal: true
class Notification::TwitterTokenExpired < Notification::ServiceTokenExpired
end

View File

@ -1,5 +0,0 @@
# frozen_string_literal: true
# stub model for notifying about expired service connections
class User::ExpiredServiceConnection < User
end

View File

@ -1,4 +0,0 @@
# frozen_string_literal: true
class User::ExpiredTwitterServiceConnection < User::ExpiredServiceConnection
end

View File

@ -1,8 +0,0 @@
.d-flex.notification
.flex-shrink-0.notification__icon
%i.fa.fa-2x.fa-fw.fa-twitter
.flex-grow-1
%h6.notification__user
= t(".heading")
.notification__text
= t(".text_html", settings_sharing: link_to(t(".settings_services"), services_path))

View File

@ -359,10 +359,6 @@ en:
heading: "Push notifications are failing to send to one of your devices."
text_html: "Please check the %{settings_push} if you still want to be notified."
settings_push: "push notification settings"
expiredtwitterserviceconnection:
heading: "Twitter connection expired"
text_html: "If you would like to continue automatically sharing your answers to Twitter, head to %{settings_sharing} and re-connect your account."
settings_services: "Sharing Settings"
settings:
account:
email_confirm: "Currently awaiting confirmation for %{resource}"

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class RemoveExpiredServiceConnectionNotifications < ActiveRecord::Migration[6.1]
def up = Notification.where(type: "Notification::ServiceTokenExpired").delete_all
def down = raise ActiveRecord::IrreversibleMigration
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_02_05_162800) do
ActiveRecord::Schema.define(version: 2023_02_12_181044) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"