Skip to content

UpdateShortMessage on own message ? #3

Open

Description

@Thus0

With current level api, the bot doesn't seem to receive the messages sent by a user with same phone number registered : if I log in telegram with the same phone number, I cannot talk to my bot (for debug or test). So I need to have 2 phone numbers or ask someone else to write...
If I undestand : https://core.telegram.org/constructor/updateShortMessage
we can only receive messages from other contacts.

What's the best solution to develop and test ? Is there a way to distinguish real person and a bot (even if associated with same phone number for security reasons ?) and change the informations for the bot (avatar, ...). For example, after registering an app/bot with the form https://my.telegram.org/apps, we could have special credentials or a virtual phone number (linked to real phone number) so we can use it to authenticate the bot with the SMS code ? Or we could use the same mechanism as https://my.telegram.org/apps ie. receive the TLSEntCode by secure chat in telegram : so we don't need to have a second phone number.

Thanks

Activity

  1. ex3ndr commented on Apr 6, 2014

    @ex3ndr
    Collaborator

    Bot doesn't implemented correctly for now.
    Telegram Api have an idea about Update Sequence and all update messages (username changed, messages, etc...) are sent by server in special sequence. Sometimes this messages may be lost and we might to detect holes in sequence and calling manually getDifference.
    Also, we expected that clients in some situations call getDifference manually, for example in case when updateShortMessage arrived with unknown user, app might ignore this update and call getDifference.
    In a week i'll release new version of telegram api with correct update sequence processing.
    For now you could investigate update processing in Telegram S sources: https://github.com/ex3ndr/telegram/blob/master/app/src/main/java/org/telegram/android/core/background/UpdateProcessor.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions