aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-20 17:30:19 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-20 17:30:19 +0200
commit1cf055d2fdbaa881cfc8ead6b78dc744e9dbe596 (patch)
tree51c0a3463ff3d5f005aeb6dccf6c50d05fddab42 /src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
parentbeafb06b6a59649a4c314db820f5ce30be120e7c (diff)
not working version of otr file transfer
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
index abede91a1..494ff0d6f 100644
--- a/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
+++ b/src/eu/siacs/conversations/xmpp/jingle/stanzas/Content.java
@@ -25,12 +25,16 @@ public class Content extends Element {
this.transportId = sid;
}
- public void setFileOffer(JingleFile actualFile) {
+ public void setFileOffer(JingleFile 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(""+actualFile.getSize());
- file.addChild("name").setContent(actualFile.getName());
+ if (otr) {
+ file.addChild("name").setContent(actualFile.getName()+".otr");
+ } else {
+ file.addChild("name").setContent(actualFile.getName());
+ }
}
public Element getFileOffer() {