You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/11/06 10:17:20 UTC

[camel] branch master updated (fcfdae6 -> 8a7783f)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from fcfdae6  Removed the TodoComments module from checkstyle, we were not really using it
     new e3ffa93  CAMEL-14143 - Slack Component: Consumer does not retrieve user details on message event, thanks to Andy Krohg for the patch
     new 8a7783f  CAMEL-14143 - Fixed CS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/component/slack/SlackEndpoint.java   |  4 ++--
 .../apache/camel/component/slack/helper/SlackMessage.java | 15 ++++++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)


[camel] 02/02: CAMEL-14143 - Fixed CS

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8a7783f47928196c769bd4cfbfbda42154603b04
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 6 11:04:44 2019 +0100

    CAMEL-14143 - Fixed CS
---
 .../camel/component/slack/helper/SlackMessage.java     | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java b/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java
index 46fcbd6..8d4f92a 100644
--- a/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java
+++ b/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java
@@ -53,14 +53,14 @@ public class SlackMessage {
     }
 
     public String getUser() {
-		return user;
-	}
+        return user;
+    }
 
-	public void setUser(String user) {
-		this.user = user;
-	}
+    public void setUser(String user) {
+        this.user = user;
+    }
 
-	public String getIconUrl() {
+    public String getIconUrl() {
         return iconUrl;
     }
 
@@ -231,18 +231,23 @@ public class SlackMessage {
             public String getTitle() {
                 return title;
             }
+
             public void setTitle(String title) {
                 this.title = title;
             }
+
             public String getValue() {
                 return value;
             }
+
             public void setValue(String value) {
                 this.value = value;
             }
+
             public Boolean isShortValue() {
                 return shortValue;
             }
+
             public void setShortValue(Boolean shortValue) {
                 this.shortValue = shortValue;
             }
@@ -250,4 +255,3 @@ public class SlackMessage {
     }
 
 }
-


[camel] 01/02: CAMEL-14143 - Slack Component: Consumer does not retrieve user details on message event, thanks to Andy Krohg for the patch

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e3ffa937dd00f06fcaae13c352dcfe598c26777e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Nov 6 11:03:07 2019 +0100

    CAMEL-14143 - Slack Component: Consumer does not retrieve user details on message event, thanks to Andy Krohg for the patch
---
 .../java/org/apache/camel/component/slack/SlackEndpoint.java  |  4 ++--
 .../org/apache/camel/component/slack/helper/SlackMessage.java | 11 ++++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
index 8c8368d..6c4e268 100644
--- a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
+++ b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
@@ -184,9 +184,9 @@ public class SlackEndpoint extends ScheduledPollEndpoint {
         Exchange exchange = super.createExchange(pattern);
         SlackMessage slackMessage = new SlackMessage();
         String text = object.getString("text");
-        String username = object.getString("username");
+        String user = object.getString("user");
         slackMessage.setText(text);
-        slackMessage.setUsername(username);
+        slackMessage.setUser(user);
         if (ObjectHelper.isNotEmpty(object.get("icons"))) {
             JsonObject icons = object.getMap("icons");
             if (ObjectHelper.isNotEmpty(icons.get("emoji"))) {
diff --git a/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java b/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java
index 0a66060..46fcbd6 100644
--- a/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java
+++ b/components/camel-slack/src/main/java/org/apache/camel/component/slack/helper/SlackMessage.java
@@ -23,6 +23,7 @@ public class SlackMessage {
     private String text;
     private String channel;
     private String username;
+    private String user;
     private String iconUrl;
     private String iconEmoji;
     private List<Attachment> attachments;
@@ -51,7 +52,15 @@ public class SlackMessage {
         this.username = username;
     }
 
-    public String getIconUrl() {
+    public String getUser() {
+		return user;
+	}
+
+	public void setUser(String user) {
+		this.user = user;
+	}
+
+	public String getIconUrl() {
         return iconUrl;
     }