camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [4/8] camel git commit: no extension for general file
Date Fri, 27 Jan 2017 12:56:36 GMT
no extension for general file


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/17a5a4c9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/17a5a4c9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/17a5a4c9

Branch: refs/heads/master
Commit: 17a5a4c9294ed774741196e51f33cab8812bbb3d
Parents: b8d2cdc
Author: Neffez <mail@steffen-eitelmann.com>
Authored: Fri Jan 20 13:52:33 2017 +0100
Committer: Nicola Ferraro <ni.ferraro@gmail.com>
Committed: Fri Jan 27 13:56:19 2017 +0100

----------------------------------------------------------------------
 .../component/telegram/util/TelegramConverter.java | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/17a5a4c9/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/util/TelegramConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/util/TelegramConverter.java
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/util/TelegramConverter.java
index cf19994..81433f0 100644
--- a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/util/TelegramConverter.java
+++ b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/util/TelegramConverter.java
@@ -158,17 +158,16 @@ public final class TelegramConverter {
         }
         case DOCUMENT:
         default: {
-                // this can be any file
-                OutgoingDocumentMessage document = new OutgoingDocumentMessage();
-                String title = (String) exchange.getIn().getHeader(TelegramConstants.TELEGRAM_MEDIA_TITLE_CAPTION);
-                String fileName = "file." + type.getFileExtension();
+            // this can be any file
+            OutgoingDocumentMessage document = new OutgoingDocumentMessage();
+            String title = (String) exchange.getIn().getHeader(TelegramConstants.TELEGRAM_MEDIA_TITLE_CAPTION);
 
-                document.setCaption(title);
-                document.setFilenameWithExtension(fileName);
-                document.setDocument(message);
+            document.setCaption(title);
+            document.setFilenameWithExtension("file");
+            document.setDocument(message);
 
-                result = document;
-                break;
+            result = document;
+            break;
             }
         }
 


Mime
View raw message