mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 12:42:16 -05:00
Merge pull request #2315 from licaon-kter/lecagy-typo
Fix a typo in legacy
This commit is contained in:
commit
a28116753a
@ -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() {
|
||||
|
@ -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) {
|
||||
|
@ -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<MessagePacket, Long> f = original.getForwardedMessagePacket("result", mamLagecy ? Xmlns.MAM_LAGECY : Xmlns.MAM);
|
||||
Pair<MessagePacket, Long> f = original.getForwardedMessagePacket("result", mamLegacy ? Xmlns.MAM_LEGACY : Xmlns.MAM);
|
||||
if (f == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user