Skip to content

Commit

Permalink
Merge branch 'hotfix/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sojan-official committed Jan 18, 2022
2 parents 4a902fc + 1749b4e commit ceb2b96
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/concerns/assignment_handler.rb
Expand Up @@ -4,7 +4,7 @@ module AssignmentHandler

included do
before_save :ensure_assignee_is_from_team
after_update :notify_assignment_change, :process_assignment_activities
after_commit :notify_assignment_change, :process_assignment_activities
end

private
Expand Down
6 changes: 4 additions & 2 deletions app/models/notification.rb
Expand Up @@ -71,6 +71,7 @@ def fcm_push_data
end

# TODO: move to a data presenter
# rubocop:disable Metrics/CyclomaticComplexity
def push_message_title
case notification_type
when 'conversation_creation'
Expand All @@ -81,14 +82,15 @@ def push_message_title
I18n.t(
'notifications.notification_title.assigned_conversation_new_message',
display_id: conversation.display_id,
content: primary_actor.content&.truncate_words(10)
content: primary_actor&.content&.truncate_words(10)
)
when 'conversation_mention'
"[##{conversation.display_id}] #{transform_user_mention_content primary_actor.content}"
"[##{conversation&.display_id}] #{transform_user_mention_content primary_actor&.content}"
else
''
end
end
# rubocop:enable Metrics/CyclomaticComplexity

def conversation
return primary_actor.conversation if %w[assigned_conversation_new_message conversation_mention].include? notification_type
Expand Down
2 changes: 1 addition & 1 deletion config/app.yml
@@ -1,5 +1,5 @@
shared: &shared
version: '2.1.0'
version: '2.1.1'

development:
<<: *shared
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@chatwoot/chatwoot",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",
"scripts": {
"eslint": "eslint app/**/*.{js,vue} --fix",
Expand Down

0 comments on commit ceb2b96

Please sign in to comment.