mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-09 22:55:34 +08:00
added subject instead of message
This commit is contained in:
parent
0e0f7fe0da
commit
5e97cf9554
1 changed files with 10 additions and 12 deletions
|
@ -12,26 +12,24 @@ module NotificationsHelper
|
|||
unassigned_user: target_user.name,
|
||||
team: team.name,
|
||||
unassigned_by_user: user.name)
|
||||
message = team.name
|
||||
|
||||
if role
|
||||
title = I18n.t('notifications.assign_user_to_team',
|
||||
assigned_user: target_user.name,
|
||||
role: role,
|
||||
team: team.name,
|
||||
assigned_by_user: user.name)
|
||||
message = ActionController::Base.helpers.sanitize(
|
||||
"<a href=#{projects_path(team: team)} target='_blank'>#{team.name}</a>"
|
||||
)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
GeneralNotification.send_notifications({
|
||||
type: role ? :invite_user_to_team : :remove_user_from_team,
|
||||
title: sanitize_input(title),
|
||||
message: message,
|
||||
user: target_user
|
||||
})
|
||||
GeneralNotification.send_notifications(
|
||||
{
|
||||
type: role ? :invite_user_to_team : :remove_user_from_team,
|
||||
title: sanitize_input(title),
|
||||
subject_id: team.id,
|
||||
subject_class: team.class.name,
|
||||
subject_name: team.respond_to?(:name) && team.name,
|
||||
user: target_user
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue