diff --git a/src/main/java/eu/siacs/conversations/entities/MucOptions.java b/src/main/java/eu/siacs/conversations/entities/MucOptions.java index 03d49106..efbddcf3 100644 --- a/src/main/java/eu/siacs/conversations/entities/MucOptions.java +++ b/src/main/java/eu/siacs/conversations/entities/MucOptions.java @@ -374,11 +374,11 @@ public class MucOptions { } public boolean mamSupport() { - return hasFeature(Xmlns.MAM) || hasFeature(Xmlns.MAM_LAGECY); + return hasFeature(Xmlns.MAM) || hasFeature(Xmlns.MAM_LEGACY); } public boolean mamLegacy() { - return hasFeature(Xmlns.MAM_LAGECY) && !hasFeature(Xmlns.MAM); + return hasFeature(Xmlns.MAM_LEGACY) && !hasFeature(Xmlns.MAM); } public boolean nonanonymous() { diff --git a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java index 2d371ab6..3ad93857 100644 --- a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java @@ -229,10 +229,10 @@ public class IqGenerator extends AbstractGenerator { public IqPacket queryMessageArchiveManagement(final MessageArchiveService.Query mam) { final IqPacket packet = new IqPacket(IqPacket.TYPE.SET); - final Element query = packet.query(mam.isLegacy() ? Xmlns.MAM_LAGECY : Xmlns.MAM); + final Element query = packet.query(mam.isLegacy() ? Xmlns.MAM_LEGACY : Xmlns.MAM); query.setAttribute("queryid", mam.getQueryId()); final Data data = new Data(); - data.setFormType(mam.isLegacy() ? Xmlns.MAM_LAGECY : Xmlns.MAM); + data.setFormType(mam.isLegacy() ? Xmlns.MAM_LEGACY : Xmlns.MAM); if (mam.muc()) { packet.setTo(mam.getWith()); } else if (mam.getWith()!=null) { diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index c0b29098..8b0f263b 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -300,16 +300,16 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece final boolean isForwarded; boolean isCarbon = false; String serverMsgId = null; - final Element fin = original.findChild("fin", Xmlns.MAM_LAGECY); + final Element fin = original.findChild("fin", Xmlns.MAM_LEGACY); if (fin != null) { - mXmppConnectionService.getMessageArchiveService().processFinLagecy(fin,original.getFrom()); + mXmppConnectionService.getMessageArchiveService().processFinLegacy(fin,original.getFrom()); return; } - final boolean mamLagecy = original.hasChild("result",Xmlns.MAM_LAGECY); - final Element result = original.findChild("result",mamLagecy ? Xmlns.MAM_LAGECY : Xmlns.MAM); + final boolean mamLegacy = original.hasChild("result",Xmlns.MAM_LEGACY); + final Element result = original.findChild("result",mamLegacy ? Xmlns.MAM_LEGACY : Xmlns.MAM); final MessageArchiveService.Query query = result == null ? null : mXmppConnectionService.getMessageArchiveService().findQuery(result.getAttribute("queryid")); if (query != null && query.validFrom(original.getFrom())) { - Pair f = original.getForwardedMessagePacket("result", mamLagecy ? Xmlns.MAM_LAGECY : Xmlns.MAM); + Pair f = original.getForwardedMessagePacket("result", mamLegacy ? Xmlns.MAM_LEGACY : Xmlns.MAM); if (f == null) { return; } diff --git a/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java b/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java index ca679164..6ba05f56 100644 --- a/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java +++ b/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java @@ -221,7 +221,7 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded { return queryInProgress(conversation, null); } - public void processFinLagecy(Element fin, Jid from) { + public void processFinLegacy(Element fin, Jid from) { Query query = findQuery(fin.getAttribute("queryid")); if (query != null && query.validFrom(from)) { processFin(fin); diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 0c49b9e7..aa232b74 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -3715,13 +3715,13 @@ public class XmppConnectionService extends Service { } public void fetchMamPreferences(Account account, final OnMamPreferencesFetched callback) { - final boolean lagecy = account.getXmppConnection().getFeatures().mamLegacy(); + final boolean legacy = account.getXmppConnection().getFeatures().mamLegacy(); IqPacket request = new IqPacket(IqPacket.TYPE.GET); - request.addChild("prefs",lagecy ? Xmlns.MAM_LAGECY : Xmlns.MAM); + request.addChild("prefs",legacy ? Xmlns.MAM_LEGACY : Xmlns.MAM); sendIqPacket(account, request, new OnIqPacketReceived() { @Override public void onIqPacketReceived(Account account, IqPacket packet) { - Element prefs = packet.findChild("prefs",lagecy ? Xmlns.MAM_LAGECY : Xmlns.MAM); + Element prefs = packet.findChild("prefs",legacy ? Xmlns.MAM_LEGACY : Xmlns.MAM); if (packet.getType() == IqPacket.TYPE.RESULT && prefs != null) { callback.onPreferencesFetched(prefs); } else { diff --git a/src/main/java/eu/siacs/conversations/utils/Xmlns.java b/src/main/java/eu/siacs/conversations/utils/Xmlns.java index e0c501c7..4edd8805 100644 --- a/src/main/java/eu/siacs/conversations/utils/Xmlns.java +++ b/src/main/java/eu/siacs/conversations/utils/Xmlns.java @@ -8,5 +8,5 @@ public final class Xmlns { public static final String HTTP_UPLOAD = "urn:xmpp:http:upload"; public static final String STANZA_IDS = "urn:xmpp:sid:0"; public static final String MAM = "urn:xmpp:mam:1"; - public static final String MAM_LAGECY = "urn:xmpp:mam:0"; + public static final String MAM_LEGACY = "urn:xmpp:mam:0"; } diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index e2b5d0bb..7309de96 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1636,12 +1636,12 @@ public class XmppConnection implements Runnable { public boolean mam() { return hasDiscoFeature(account.getJid().toBareJid(), Xmlns.MAM) - || hasDiscoFeature(account.getJid().toBareJid(), Xmlns.MAM_LAGECY); + || hasDiscoFeature(account.getJid().toBareJid(), Xmlns.MAM_LEGACY); } public boolean mamLegacy() { return !hasDiscoFeature(account.getJid().toBareJid(),Xmlns.MAM) - && hasDiscoFeature(account.getJid().toBareJid(),Xmlns.MAM_LAGECY); + && hasDiscoFeature(account.getJid().toBareJid(),Xmlns.MAM_LEGACY); } public boolean push() {