Don't require WebNotifications permission
This commit is contained in:
parent
9ddb984004
commit
6e58e8d50f
1 changed files with 0 additions and 10 deletions
|
@ -243,11 +243,6 @@ class Wrapper
|
||||||
|
|
||||||
actionWebNotification: (message) ->
|
actionWebNotification: (message) ->
|
||||||
$.when(@event_site_info).done =>
|
$.when(@event_site_info).done =>
|
||||||
# Check that this site may send notifications
|
|
||||||
if "WebNotifications" not in @site_info.settings.permissions
|
|
||||||
res = {"error": "No WebNotifications permission"}
|
|
||||||
@sendInner {"cmd": "response", "to": message.id, "result": res}
|
|
||||||
return
|
|
||||||
# Check that the wrapper may send notifications
|
# Check that the wrapper may send notifications
|
||||||
if Notification.permission == "granted"
|
if Notification.permission == "granted"
|
||||||
@displayWebNotification message
|
@displayWebNotification message
|
||||||
|
@ -261,11 +256,6 @@ class Wrapper
|
||||||
|
|
||||||
actionCloseWebNotification: (message) ->
|
actionCloseWebNotification: (message) ->
|
||||||
$.when(@event_site_info).done =>
|
$.when(@event_site_info).done =>
|
||||||
# Check that this site may send notifications
|
|
||||||
if "WebNotifications" not in @site_info.settings.permissions
|
|
||||||
res = {"error": "No WebNotifications permission"}
|
|
||||||
@sendInner {"cmd": "response", "to": message.id, "result": res}
|
|
||||||
return
|
|
||||||
id = message.params[0]
|
id = message.params[0]
|
||||||
@web_notifications[id].close()
|
@web_notifications[id].close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue