diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-10-05 13:00:21 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-10-05 13:00:21 +0200 |
commit | df05605f033c20fdb9bdc34f359708b82754d32e (patch) | |
tree | f93328feb1799b082ca5f776152fbc3b92cbaff8 /src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java | |
parent | dafb125a4f29226b6a3e8aa93de3d5163126c9ce (diff) |
Fixes FS#70 - Introduction of a ConversationsPlusApplication to get global access to app information
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java b/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java index 8199e59c..3382ee23 100644 --- a/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java +++ b/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java @@ -4,12 +4,12 @@ package de.thedevstack.conversationsplus.generator; import java.util.ArrayList; import java.util.List; +import de.thedevstack.conversationsplus.ConversationsPlusApplication; import de.thedevstack.conversationsplus.entities.Account; import de.thedevstack.conversationsplus.entities.Conversation; import de.thedevstack.conversationsplus.entities.DownloadableFile; import de.thedevstack.conversationsplus.services.MessageArchiveService; import de.thedevstack.conversationsplus.services.XmppConnectionService; -import de.thedevstack.conversationsplus.utils.PhoneHelper; import de.thedevstack.conversationsplus.utils.Xmlns; import de.thedevstack.conversationsplus.xml.Element; import de.thedevstack.conversationsplus.xmpp.forms.Data; @@ -33,7 +33,7 @@ public class IqGenerator extends AbstractGenerator { final Element identity = query.addChild("identity"); identity.setAttribute("category", "client"); identity.setAttribute("type", IDENTITY_TYPE); - identity.setAttribute("name", getIdentityName()); + identity.setAttribute("name", ConversationsPlusApplication.getNameAndVersion()); for (final String feature : getFeatures()) { query.addChild("feature").setAttribute("var", feature); } @@ -43,8 +43,8 @@ public class IqGenerator extends AbstractGenerator { public IqPacket versionResponse(final IqPacket request) { final IqPacket packet = request.generateResponse(IqPacket.TYPE.RESULT); Element query = packet.query("jabber:iq:version"); - query.addChild("name").setContent(IDENTITY_NAME); - query.addChild("version").setContent(getIdentityVersion()); + query.addChild("name").setContent(ConversationsPlusApplication.getName()); + query.addChild("version").setContent(ConversationsPlusApplication.getVersion()); return packet; } |