only extract stanza-id from live messages when disco feature is set

This commit is contained in:
Daniel Gultsch 2017-02-14 23:16:51 +01:00
parent b90a1fe1db
commit bb249e0881

View File

@ -437,10 +437,10 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
final boolean safeToExtract; final boolean safeToExtract;
if (isTypeGroupChat) { if (isTypeGroupChat) {
by = conversation.getJid().toBareJid(); by = conversation.getJid().toBareJid();
safeToExtract = true; //conversation.getMucOptions().hasFeature(Xmlns.STANZA_IDS); safeToExtract = conversation.getMucOptions().hasFeature(Xmlns.STANZA_IDS);
} else { } else {
by = account.getJid().toBareJid(); by = account.getJid().toBareJid();
safeToExtract = true; //account.getXmppConnection().getFeatures().stanzaIds(); safeToExtract = account.getXmppConnection().getFeatures().stanzaIds();
} }
if (safeToExtract) { if (safeToExtract) {
serverMsgId = extractStanzaId(packet, by); serverMsgId = extractStanzaId(packet, by);