Issue with markdown unparse and parse · Issue #61 · hydrogram/hydrogram · GitHub
Skip to content

Issue with markdown unparse and parse #61

Description

@SpEcHiDe

Checklist

  • I am sure the error is coming from Hydrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/hydrogram/hydrogram/archive/dev.zip and reproduced the issue using the latest development version

Description

Try to unparse the markdown using Hydrogram and send back the received string using send_message method

Steps to reproduce

error.text and second.text looks different.

Code example

from hydrogram import Client
from hydrogram.enums import ParseMode

async def main():
  async with Client("my_account") as app:
    error = await app.get_messages(chat_id="@HydrogramChat", message_ids=5304)
    first = await error.reply(error.text.markdown, parse_mode=ParseMode.DISABLED)
    second = await error.reply(first.text, parse_mode=ParseMode.MARKDOWN)

Logs

Activity

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