diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-08-01 01:19:16 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-08-01 01:19:16 +0200 |
commit | 60cd307f73d5f31f25ba84541fbe1cce4aae2bc2 (patch) | |
tree | 9d5e82266d6e3e27472e0305df3f47e230b4da68 /src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas | |
parent | 6059b964569fb406bbc86a0ccb19e76851fba2b6 (diff) |
enable axolotl encryption for jingle supported file transfers
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java index bcadbe778..f752cc5d3 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java @@ -25,17 +25,18 @@ public class Content extends Element { this.transportId = sid; } - public void setFileOffer(DownloadableFile actualFile, boolean otr) { + public Element setFileOffer(DownloadableFile actualFile, boolean otr) { Element description = this.addChild("description", "urn:xmpp:jingle:apps:file-transfer:3"); Element offer = description.addChild("offer"); Element file = offer.addChild("file"); - file.addChild("size").setContent(Long.toString(actualFile.getSize())); + file.addChild("size").setContent(Long.toString(actualFile.getExpectedSize())); if (otr) { file.addChild("name").setContent(actualFile.getName() + ".otr"); } else { file.addChild("name").setContent(actualFile.getName()); } + return file; } public Element getFileOffer() { |