Giter Site home page Giter Site logo

Comments (3)

knsd avatar knsd commented on May 8, 2024 2

Thanks, @noiob!

I will fix it today.

from telegram-bot.

noiob avatar noiob commented on May 8, 2024

Okay, so I've found a message from a group being changed into a supergroup:
"message":{"message_id":28164,"from":{"id":28111482,"first_name":"redacted","last_name":"redacted","username":"redacted"},"chat":{"id":-137980893,"title":"test group","type":"group"},"date":1458925136,"migrate_to_chat_id":-1001026227392}},{"update_id":591487127,

So the problem most likely is imho in the function fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error> (line 410 in mod.rs):
The only check for supergroup migration (I haven't found a way of directly creating a supergroup in any of the clients I use, btw) is this:

if let Some(true) = try!(d.read_struct_field(
            "supergroup_chat_created", 0, Decodable::decode)) {
            return Ok(MessageType::SuperGroupChatCreated(GroupToSuperGroupMigration {
                from: try_field!(d, "migrate_from_chat_id"),
                to: try_field!(d, "migrate_to_chat_id"),
            }))
        };

However, the message only contains migrate_to_chat_id, which in turn causes an error.

[This is propably too long and not the right format for an issue, so apologies in advance, thanks for this awesome library!]

from telegram-bot.

knsd avatar knsd commented on May 8, 2024

Fixed in #38 and in upstream.

from telegram-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.