Skip to content

Commit e8d1d11

Browse files
committed
Revert forcing wpn settings on users
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent b55ea73 commit e8d1d11

4 files changed

Lines changed: 0 additions & 122 deletions

File tree

event/listener.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public static function getSubscribedEvents()
3131
'core.ucp_display_module_before' => 'load_language',
3232
'core.acp_main_notice' => 'compatibility_notice',
3333
'core.page_header_after' => 'load_template_data',
34-
'core.user_add_modify_notifications_data' => 'add_user_notification_data',
3534
];
3635
}
3736

@@ -100,24 +99,4 @@ public function compatibility_notice()
10099
{
101100
$this->template->assign_var('S_WPN_COMPATIBILITY_NOTICE', phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '>='));
102101
}
103-
104-
/**
105-
* Add default web push notification settings for new users
106-
*
107-
* @param \phpbb\event\data $event The event object
108-
* @return void
109-
*/
110-
public function add_user_notification_data($event)
111-
{
112-
$notifications_data = $event['notifications_data'];
113-
$notifications_data[] = [
114-
'item_type' => 'notification.type.quote',
115-
'method' => 'notification.method.phpbb.wpn.webpush',
116-
];
117-
$notifications_data[] = [
118-
'item_type' => 'notification.type.pm',
119-
'method' => 'notification.method.phpbb.wpn.webpush',
120-
];
121-
$event['notifications_data'] = $notifications_data;
122-
}
123102
}

migrations/update_user_notifications.php

Lines changed: 0 additions & 94 deletions
This file was deleted.

tests/event/listener_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ public function test_getSubscribedEvents()
125125
'core.ucp_display_module_before',
126126
'core.acp_main_notice',
127127
'core.page_header_after',
128-
'core.user_add_modify_notifications_data',
129128
], array_keys(\phpbb\webpushnotifications\event\listener::getSubscribedEvents()));
130129
}
131130

tests/functional/functional_test.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ public function test_ucp_module()
7272

7373
$this->assertContainsLang('NOTIFY_WEBPUSH_ENABLE', $crawler->filter('label[for="subscribe_webpush"]')->text());
7474
$this->assertContainsLang('NOTIFICATION_METHOD_PHPBB_WPN_WEBPUSH', $crawler->filter('th.mark')->eq(2)->text());
75-
76-
$wp_list = $crawler->filter('.table1');
77-
$this->assert_checkbox_is_checked($wp_list, 'notification.type.quote_notification.method.phpbb.wpn.webpush');
78-
$this->assert_checkbox_is_checked($wp_list, 'notification.type.pm_notification.method.phpbb.wpn.webpush');
79-
$this->assert_checkbox_is_unchecked($wp_list, 'notification.type.bookmark_notification.method.phpbb.wpn.webpush');
80-
$this->assert_checkbox_is_unchecked($wp_list, 'notification.type.group_request_notification.method.phpbb.wpn.webpush');
8175
}
8276

8377
public function test_dropdown_subscribe_button()

0 commit comments

Comments
 (0)