Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageChat not exported #85

Closed
shouya opened this issue Feb 16, 2018 · 2 comments
Closed

MessageChat not exported #85

shouya opened this issue Feb 16, 2018 · 2 comments
Assignees

Comments

@shouya
Copy link
Contributor

shouya commented Feb 16, 2018

I'm playing with this library (master) but find that it's unable to pattern matching on chat field of a Message.

The Message struct looks like:

pub struct Message {
    pub id: MessageId,
    pub from: User,
    pub date: Integer,
    pub chat: MessageChat,
    pub forward: Option<Forward>,
    pub reply_to_message: Option<Box<MessageOrChannelPost>>,
    pub edit_date: Option<Integer>,
    pub kind: MessageKind,
}

The chat field has type of MessageChat, which is defined in telegram_bot_raw::types::chat module. This module is not re-exported in the top level module of telegram-bot crate, so I'm not able to use it directly.

Now I have to include the telegram-bot-raw crate to achieve my goal, but I think this might not be intended.

@knsd
Copy link
Member

knsd commented Feb 16, 2018

Oh, you are right, thanks for notice. I forgot to re-export some types: MessageChat, MessageOrChannelPost and ChannelPost

I will update upload new version tomorrow.

@knsd knsd self-assigned this Feb 16, 2018
knsd added a commit that referenced this issue Feb 17, 2018
@knsd
Copy link
Member

knsd commented Feb 17, 2018

Fixed in 0.6.1.

@knsd knsd closed this as completed Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants