Skip to content

Commit

Permalink
Merge branch 'jb14210' into 'master'
Browse files Browse the repository at this point in the history
[commhistoryd] Added error message for IM message failure. Fixes JB#14210

See merge request mer-core/commhistory-daemon!24
  • Loading branch information
Lauri Kopo committed Jul 2, 2018
2 parents 3b9ac9c + e39f69c commit 8007dfa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/locstrings.h
Expand Up @@ -113,6 +113,8 @@

//% "SMS sending failed to %1"
#define txt_qtn_msg_error_sms_sending_failed(STR) qtTrId("qtn_msg_error_sms_sending_failed").arg(STR)
//% "Message sending failed to %1"
#define txt_qtn_msg_error_sending_failed(STR) qtTrId("qtn_msg_error_sending_failed").arg(STR)
//% "SMS sending failed. No message center number found in the sim card."
#define txt_qtn_msg_error_missing_smsc qtTrId("qtn_msg_error_missing_smsc")
//% "Fixed dialing active. Sending not allowed to %1."
Expand Down
7 changes: 6 additions & 1 deletion src/textchannellistener.cpp
Expand Up @@ -1123,7 +1123,7 @@ void TextChannelListener::handleMessageFailed(const Tp::ReceivedMessage &message
recipient = event.recipients().value(0).remoteUid();
}

// general error
// general sms error
QString errorMsgToUser = txt_qtn_msg_error_sms_sending_failed(recipient);
QString category = StrongErrorCategory;

Expand All @@ -1148,6 +1148,11 @@ void TextChannelListener::handleMessageFailed(const Tp::ReceivedMessage &message
errorMsgToUser = txt_qtn_msg_general_does_not_support_offline;
category = ErrorCategory;
}
// IM message error
else if (event.type() == CommHistory::Event::IMEvent) {
errorMsgToUser = txt_qtn_msg_error_sending_failed(recipient);
category = ErrorCategory;
}

DEBUG() << "error message shown to user:" << errorMsgToUser;
showErrorNote(errorMsgToUser, category);
Expand Down

0 comments on commit 8007dfa

Please sign in to comment.