Improved visualisation of delivery failed message.
This commit is contained in:
parent
8b9d917a1e
commit
24eae3104e
5 changed files with 21 additions and 10 deletions
|
@ -117,7 +117,14 @@ class ArticleViewItem extends App.ObserverController
|
||||||
article['html'] = App.Utils.text2html(body)
|
article['html'] = App.Utils.text2html(body)
|
||||||
article['html'] = article['html'].replace(signatureDetected, '<span class="js-signatureMarker"></span>')
|
article['html'] = article['html'].replace(signatureDetected, '<span class="js-signatureMarker"></span>')
|
||||||
|
|
||||||
if article.sender.name is 'System' && !article.preferences.delivery_message
|
if article.preferences.delivery_message
|
||||||
|
@html App.view('ticket_zoom/article_view_delivery_failed')(
|
||||||
|
ticket: @ticket
|
||||||
|
article: article
|
||||||
|
isCustomer: @isRole('Customer')
|
||||||
|
)
|
||||||
|
return
|
||||||
|
if article.sender.name is 'System'
|
||||||
#if article.sender.name is 'System' && article.preferences.perform_origin is 'trigger'
|
#if article.sender.name is 'System' && article.preferences.perform_origin is 'trigger'
|
||||||
@html App.view('ticket_zoom/article_view_system')(
|
@html App.view('ticket_zoom/article_view_system')(
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<div class="article-meta-clip"></div>
|
||||||
|
<div class="article-content">
|
||||||
|
<div class="small task-subline alert alert--warning">
|
||||||
|
<%- @T('Delivery failed') %>: "<%= @article.body %>"
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="article-meta-clip"></div>
|
|
@ -23,9 +23,9 @@ class Observer::Ticket::Article::CommunicateEmail::BackgroundJob
|
||||||
|
|
||||||
# send email
|
# send email
|
||||||
if !ticket.group.email_address_id
|
if !ticket.group.email_address_id
|
||||||
log_error(record, "Unable to send email, no email address definde for group id '#{ticket.group.id}'")
|
log_error(record, "No email address definde for group id '#{ticket.group.id}'!")
|
||||||
elsif !ticket.group.email_address.channel_id
|
elsif !ticket.group.email_address.channel_id
|
||||||
log_error(record, "Unable to send email, no channel definde for email_address id '#{ticket.group.email_address_id}'")
|
log_error(record, "No channel definde for email_address id '#{ticket.group.email_address_id}'!")
|
||||||
end
|
end
|
||||||
|
|
||||||
channel = ticket.group.email_address.channel
|
channel = ticket.group.email_address.channel
|
||||||
|
@ -129,7 +129,7 @@ class Observer::Ticket::Article::CommunicateEmail::BackgroundJob
|
||||||
Ticket::Article.create(
|
Ticket::Article.create(
|
||||||
ticket_id: local_record.ticket_id,
|
ticket_id: local_record.ticket_id,
|
||||||
content_type: 'text/plain',
|
content_type: 'text/plain',
|
||||||
body: "Unable to send email to '#{recipient_list}'\n#{message}",
|
body: "Unable to send email to '#{recipient_list}': #{message}",
|
||||||
internal: true,
|
internal: true,
|
||||||
sender: Ticket::Article::Sender.find_by(name: 'System'),
|
sender: Ticket::Article::Sender.find_by(name: 'System'),
|
||||||
type: Ticket::Article::Type.find_by(name: 'note'),
|
type: Ticket::Article::Type.find_by(name: 'note'),
|
||||||
|
@ -140,7 +140,6 @@ class Observer::Ticket::Article::CommunicateEmail::BackgroundJob
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
raise message
|
raise message
|
||||||
|
|
|
@ -46,7 +46,7 @@ class Observer::Ticket::Article::CommunicateFacebook::BackgroundJob
|
||||||
end
|
end
|
||||||
|
|
||||||
if !post
|
if !post
|
||||||
log_error(article, 'Unable to send message to facebook')
|
log_error(article, 'Got no post!')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class Observer::Ticket::Article::CommunicateFacebook::BackgroundJob
|
||||||
Ticket::Article.create(
|
Ticket::Article.create(
|
||||||
ticket_id: local_record.ticket_id,
|
ticket_id: local_record.ticket_id,
|
||||||
content_type: 'text/plain',
|
content_type: 'text/plain',
|
||||||
body: "Unable to send tweet: #{message}",
|
body: "Unable to send post: #{message}",
|
||||||
internal: true,
|
internal: true,
|
||||||
sender: Ticket::Article::Sender.find_by(name: 'System'),
|
sender: Ticket::Article::Sender.find_by(name: 'System'),
|
||||||
type: Ticket::Article::Type.find_by(name: 'note'),
|
type: Ticket::Article::Type.find_by(name: 'note'),
|
||||||
|
@ -84,7 +84,6 @@ class Observer::Ticket::Article::CommunicateFacebook::BackgroundJob
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
raise message
|
raise message
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Observer::Ticket::Article::CommunicateTwitter::BackgroundJob
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if !tweet
|
if !tweet
|
||||||
log_error(article, 'Unable to send message to twitter')
|
log_error(article, 'Got no tweet!')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -94,7 +94,6 @@ class Observer::Ticket::Article::CommunicateTwitter::BackgroundJob
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
raise message
|
raise message
|
||||||
|
|
Loading…
Reference in a new issue