Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions addons/mail/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -3938,10 +3938,10 @@ def _web_push_send_notification(self, devices, private_key, public_key, payload_
# Avoid blocking the whole request just for a notification
_logger.error('An error occurred while contacting the endpoint: %s', e)

# clean up obsolete devices
if devices_to_unlink:
devices_list = list(devices_to_unlink)
self.env['mail.push.device'].sudo().browse(devices_list).unlink()
# clean up obsolete devices
if devices_to_unlink:
devices_list = list(devices_to_unlink)
self.env['mail.push.device'].sudo().browse(devices_list).unlink()

else:
self.env['mail.push'].sudo().create([{
Expand Down
2 changes: 1 addition & 1 deletion addons/mail/tools/web_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def push_to_end_point(base_url, device, payload, vapid_private_key, vapid_public
# are not received on Edge with TTL ='0'.
# Using the TTL '0' , the microsoft endpoint returns a 400 bad request error.
# and we are sure that the notification will be received
'TTL': '60',
'TTL': '0',
}

response = session.post(endpoint, headers=headers, data=payload, timeout=5)
Expand Down
17 changes: 17 additions & 0 deletions addons/web/tooling/_eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,23 @@ addons/html_editor/static/lib/diff2html/*.js
!timer
!timer/**/*

# Whitelist voip modules
!voip
!voip/**/*
!voip_ai
!voip_ai/**/*
!voip_crm
!voip_crm/**/*
!voip_hr_recruitment
!voip_hr_recruitment/**/*
!voip_onsip
!voip_onsip/**/*
!voip_sms
!voip_sms/**/*

# BlackList voip libs
voip/static/lib/**/*

# Whitelist industry_fsm
!industry_fsm
!industry_fsm/**/*
Expand Down