fixed regression with chat markers not working

This commit is contained in:
iNPUTmice 2014-06-23 23:29:26 +02:00
parent 25e44cbf52
commit 18d0e57f52
3 changed files with 2 additions and 8 deletions

View file

@ -21,6 +21,7 @@ public class MessageGenerator {
if (conversation.getMode() == Conversation.MODE_SINGLE) {
packet.setTo(message.getCounterpart());
packet.setType(MessagePacket.TYPE_CHAT);
packet.addChild("markable", "urn:xmpp:chat-markers:0");
} else {
packet.setTo(message.getCounterpart().split("/")[0]);
packet.setType(MessagePacket.TYPE_GROUPCHAT);

View file

@ -1,6 +1,5 @@
package eu.siacs.conversations.parser;
import android.util.Log;
import net.java.otr4j.session.Session;
import net.java.otr4j.session.SessionStatus;
import eu.siacs.conversations.entities.Account;
@ -18,7 +17,6 @@ public class MessageParser extends AbstractParser {
}
public Message parseChat(MessagePacket packet, Account account) {
Log.d("xmppService","received message: "+packet.toString());
String[] fromParts = packet.getFrom().split("/");
Conversation conversation = mXmppConnectionService
.findOrCreateConversation(account, fromParts[0], false);
@ -84,7 +82,6 @@ public class MessageParser extends AbstractParser {
if (body.startsWith(CryptoHelper.FILETRANSFER)) {
String key = body.substring(CryptoHelper.FILETRANSFER.length());
conversation.setSymmetricKey(CryptoHelper.hexToBytes(key));
Log.d("xmppService","new symmetric key: "+CryptoHelper.bytesToHex(conversation.getSymmetricKey()));
return null;
}
conversation.setLatestMarkableMessageId(getMarkableMessageId(packet));

View file

@ -33,7 +33,6 @@ import android.preference.PreferenceManager;
import android.text.Editable;
import android.text.Selection;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@ -102,7 +101,7 @@ public class ConversationFragment extends Fragment {
ConversationActivity.REQUEST_DECRYPT_PGP, null, 0,
0, 0);
} catch (SendIntentException e) {
Log.d("xmppService", "couldnt fire intent");
//
}
}
}
@ -520,9 +519,6 @@ public class ConversationFragment extends Fragment {
.getJingleConnection();
if (connection != null) {
connection.accept();
} else {
Log.d("xmppService",
"attached jingle connection was null");
}
}
});