mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
create ip match notifications without forcing replacement
This commit is contained in:
parent
d950e14b3f
commit
f20d27986b
2 changed files with 6 additions and 3 deletions
|
@ -53,7 +53,7 @@ module.exports =
|
|||
university_name: body.name
|
||||
content: body.enrolment_ad_html
|
||||
logger.log user_id:userId, key:_key, "creating notification key for user"
|
||||
NotificationsHandler.createNotification userId, _key, "notification_ip_matched_affiliation", messageOpts, null, callback
|
||||
NotificationsHandler.createNotification userId, _key, "notification_ip_matched_affiliation", messageOpts, null, false, callback
|
||||
|
||||
read: (callback = ->)->
|
||||
NotificationsHandler.markAsReadWithKey userId, @key, callback
|
||||
|
|
|
@ -29,12 +29,15 @@ module.exports =
|
|||
unreadNotifications = []
|
||||
callback(null, unreadNotifications)
|
||||
|
||||
createNotification: (user_id, key, templateKey, messageOpts, expiryDateTime, callback)->
|
||||
createNotification: (user_id, key, templateKey, messageOpts, expiryDateTime, forceCreate, callback)->
|
||||
if !callback
|
||||
callback = forceCreate
|
||||
forceCreate = true
|
||||
payload = {
|
||||
key:key
|
||||
messageOpts:messageOpts
|
||||
templateKey:templateKey
|
||||
forceCreate: true
|
||||
forceCreate:forceCreate
|
||||
}
|
||||
if expiryDateTime?
|
||||
payload.expires = expiryDateTime
|
||||
|
|
Loading…
Reference in a new issue