Skip to content

Commit e2e449c

Browse files
fix: InputRichMessage write
1 parent 932f516 commit e2e449c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

pyrogram/types/input_content/input_rich_message.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ def __init__(
5858
self.skip_entity_detection = skip_entity_detection
5959

6060
def write(self) -> "raw.base.InputRichMessage":
61-
if self.rich_message.html:
61+
if self.html:
6262
input_rich_message = raw.types.InputRichMessageHTML(
63-
html=self.rich_message.html,
64-
rtl=self.rich_message.is_rtl,
65-
noautolink=self.rich_message.skip_entity_detection
63+
html=self.html,
64+
rtl=self.is_rtl,
65+
noautolink=self.skip_entity_detection
6666
)
67-
elif self.rich_message.markdown:
67+
elif self.markdown:
6868
input_rich_message = raw.types.InputRichMessageMarkdown(
69-
markdown=self.rich_message.markdown,
70-
rtl=self.rich_message.is_rtl,
71-
noautolink=self.rich_message.skip_entity_detection
69+
markdown=self.markdown,
70+
rtl=self.is_rtl,
71+
noautolink=self.skip_entity_detection
7272
)
7373
else:
7474
raise ValueError("You must provide either markdown or html in the rich message")

0 commit comments

Comments
 (0)