You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "VINEET GANDHI1 (JIRA)" <ji...@apache.org> on 2019/01/04 11:35:00 UTC

[jira] [Updated] (CAMEL-13035) Camel telegram - Update made to channel not received by camel application

     [ https://issues.apache.org/jira/browse/CAMEL-13035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

VINEET GANDHI1 updated CAMEL-13035:
-----------------------------------
    Description: 
In telegram we can create a public channel which anyone can join as subscriber and for private channel it requires a link to get added in channel. We can also add bot to channel as administrator for sending and receiving messages from subscribed channel.

In case there is any update available in channel camel will poll using telegram API and bring the update.

Currently the mapping from update json received from telegram is not getting correctly mapped to Update POJO and hence failing.

 

Json :

 

{{{code:xml}}}

result": [

        {

            "update_id": 219398823,

            *"channel_post"*: {

                "message_id": 67,

                "chat":

{                     "id": -1001245756934,                   

                       "title": "cameltemp",                  

                     "username": "cameltelegram",                    

                     "type": "channel"             

    }

,

                "date": 1546505413,

                "text": "test"

            }

        }

    ]

 {{{code}}}

Update.java :

 
{code:java}
public class Update implements Serializable {
 
    private static final long serialVersionUID = -4001092937174853655L;
 
    @JsonProperty("update_id")
    private Long updateId;
 
 
    private IncomingMessage message;
}
{code}
 

  [Telegram doc |https://core.telegram.org/bots/api#getting-updates]

  was:
In telegram we can create a public channel which anyone can join as subscriber and for private channel it requires a link to get added in channel. We can also add bot to channel as administrator for sending and receiving messages from subscribed channel.

In case there is any update available in channel camel will poll using telegram API and bring the update.

Currently the mapping from update json received from telegram is not getting correctly mapped to Update POJO and hence failing.

 

Json :

result": [

        {

            "update_id": 219398823,

            *"channel_post"*: {

                "message_id": 67,

                "chat": {

                    "id": -1001245756934,

                    "title": "cameltemp",

                    "username": "cameltelegram",

                    "type": "channel"

                },

                "date": 1546505413,

                "text": "test"

            }

        }

    ]

 

Update.java :

 
{code:java}
public class Update implements Serializable {
 
    private static final long serialVersionUID = -4001092937174853655L;
 
    @JsonProperty("update_id")
    private Long updateId;
 
 
    private IncomingMessage message;
}
{code}
 

  [Telegram doc |https://core.telegram.org/bots/api#getting-updates]


> Camel telegram - Update made to channel  not received by camel application
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-13035
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13035
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-telegram
>    Affects Versions: 3.0.0
>            Reporter: VINEET GANDHI1
>            Priority: Minor
>
> In telegram we can create a public channel which anyone can join as subscriber and for private channel it requires a link to get added in channel. We can also add bot to channel as administrator for sending and receiving messages from subscribed channel.
> In case there is any update available in channel camel will poll using telegram API and bring the update.
> Currently the mapping from update json received from telegram is not getting correctly mapped to Update POJO and hence failing.
>  
> Json :
>  
> {{{code:xml}}}
> result": [
>         {
>             "update_id": 219398823,
>             *"channel_post"*: {
>                 "message_id": 67,
>                 "chat":
> {                     "id": -1001245756934,                   
>                        "title": "cameltemp",                  
>                      "username": "cameltelegram",                    
>                      "type": "channel"             
>     }
> ,
>                 "date": 1546505413,
>                 "text": "test"
>             }
>         }
>     ]
>  {{{code}}}
> Update.java :
>  
> {code:java}
> public class Update implements Serializable {
>  
>     private static final long serialVersionUID = -4001092937174853655L;
>  
>     @JsonProperty("update_id")
>     private Long updateId;
>  
>  
>     private IncomingMessage message;
> }
> {code}
>  
>   [Telegram doc |https://core.telegram.org/bots/api#getting-updates]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)