aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils/MessageParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/utils/MessageParser.java')
-rw-r--r--src/eu/siacs/conversations/utils/MessageParser.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/eu/siacs/conversations/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java
index 936d0e9a..568386d5 100644
--- a/src/eu/siacs/conversations/utils/MessageParser.java
+++ b/src/eu/siacs/conversations/utils/MessageParser.java
@@ -149,19 +149,9 @@ public class MessageParser {
return new Message(conversation,fullJid, message.findChild("body").getContent(), Message.ENCRYPTION_NONE,status);
}
- public static Message parseError(MessagePacket packet, Account account, XmppConnectionService service) {
-
- String[] fromParts = packet.getFrom().split("/");
- Conversation conversation = service.findOrCreateConversation(account, fromParts[0],false);
- Element error = packet.findChild("error");
- String errorName = error.getChildren().get(0).getName();
- String displayError;
- if (errorName.equals("service-unavailable")) {
- displayError = "Contact is offline and does not have offline storage";
- } else {
- displayError = errorName.replace("-", " ");
- }
- return new Message(conversation, packet.getFrom(), displayError, Message.ENCRYPTION_NONE, Message.STATUS_ERROR);
+ public static void parseError(MessagePacket packet, Account account, XmppConnectionService service) {
+ String[] fromParts = packet.getFrom().split("/");
+ service.markMessage(account, fromParts[0], packet.getId(), Message.STATUS_SEND_FAILED);
}
public static String getPgpBody(MessagePacket packet) {