aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/generator
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-01-29 21:46:45 +0100
committerChristian Schneppe <christian@pix-art.de>2018-01-29 21:46:45 +0100
commitbe98b5bb3d5404d0dece95ba0158ffb6ef1640f0 (patch)
tree654be352319a4b51bd13fc8a01503aefec8ec099 /src/main/java/de/pixart/messenger/generator
parent35025a1af20559a990ed6160875d3e98fb82e9cd (diff)
support new http upload namespace
Diffstat (limited to 'src/main/java/de/pixart/messenger/generator')
-rw-r--r--src/main/java/de/pixart/messenger/generator/IqGenerator.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/generator/IqGenerator.java b/src/main/java/de/pixart/messenger/generator/IqGenerator.java
index 8e3584598..234ddc3b4 100644
--- a/src/main/java/de/pixart/messenger/generator/IqGenerator.java
+++ b/src/main/java/de/pixart/messenger/generator/IqGenerator.java
@@ -354,11 +354,9 @@ public class IqGenerator extends AbstractGenerator {
IqPacket packet = new IqPacket(IqPacket.TYPE.GET);
packet.setTo(host);
Element request = packet.addChild("request", Namespace.HTTP_UPLOAD);
- request.addChild("filename").setContent(convertFilename(file.getName()));
- request.addChild("size").setContent(String.valueOf(file.getExpectedSize()));
- if (mime != null) {
- request.addChild("content-type").setContent(mime);
- }
+ request.setAttribute("filename", convertFilename(file.getName()));
+ request.setAttribute("size", file.getExpectedSize());
+ request.setAttribute("content-type", mime);
return packet;
}