Repository: aiogram/aiogram
Pull request #1164 (2023-04-16 17:21:06)

Fix typo
# Description

Fix typo




github-actions[bot]: # :x: Changelog is required!

You need to add a brief description of the changes to the `CHANGES` directory.

For example, you can run `towncrier create <issue>.<type>` to create a file in the change directory and then write a description on that file.

Read more at [Towncrier docs](https://towncrier.readthedocs.io/en/latest/quickstart.html#creating-news-fragments)

Patch:
diff --git a/CHANGES/1160.bugfix b/CHANGES/1160.bugfix
new file mode 100644
index 00000000..68e82835
--- /dev/null
+++ b/CHANGES/1160.bugfix
@@ -0,0 +1,1 @@
+Added missing FORUM_TOPIC_EDITED value to content_type property
diff --git a/aiogram/types/message.py b/aiogram/types/message.py
index c74ccb97..a057ef97 100644
--- a/aiogram/types/message.py
+++ b/aiogram/types/message.py
@@ -317,6 +317,8 @@ class Message(TelegramObject):
             return ContentType.MESSAGE_AUTO_DELETE_TIMER_CHANGED
         if self.forum_topic_created:
             return ContentType.FORUM_TOPIC_CREATED
+        if self.forum_topic_edited:
+            return ContentType.FORUM_TOPIC_EDITED
         if self.forum_topic_closed:
             return ContentType.FORUM_TOPIC_CLOSED
         if self.forum_topic_reopened:
diff --git a/examples/echo_bot.py b/examples/echo_bot.py
index d51a0eeb..e18201af 100644
--- a/examples/echo_bot.py
+++ b/examples/echo_bot.py
@@ -5,7 +5,7 @@ from aiogram import Bot, Dispatcher, Router, types
 from aiogram.filters import Command
 from aiogram.types import Message
 
-# Bot token can be obtained via https://t.me/BotFahter
+# Bot token can be obtained via https://t.me/BotFather
 TOKEN = "42:TOKEN"
 
 # All handlers should be attached to the Router (or Dispatcher)


Test patch:
diff --git a/tests/test_api/test_types/test_message.py b/tests/test_api/test_types/test_message.py
index 7eec99c7..563141f1 100644
--- a/tests/test_api/test_types/test_message.py
+++ b/tests/test_api/test_types/test_message.py
@@ -43,6 +43,7 @@ from aiogram.types import (
     Document,
     EncryptedCredentials,
     ForumTopicClosed,
+    ForumTopicEdited,
     ForumTopicCreated,
     ForumTopicReopened,
     Game,
@@ -414,6 +415,16 @@ TEST_FORUM_TOPIC_CREATED = Message(
         icon_color=0xFFD67E,
     ),
 )
+TEST_FORUM_TOPIC_EDITED = Message(
+    message_id=42,
+    date=datetime.datetime.now(),
+    chat=Chat(id=42, type="private"),
+    from_user=User(id=42, is_bot=False, first_name="Test"),
+    forum_topic_edited=ForumTopicEdited(
+        name="test_edited",
+        icon_color=0xFFD67E,
+    ),
+)
 TEST_FORUM_TOPIC_CLOSED = Message(
     message_id=42,
     date=datetime.datetime.now(),
@@ -484,6 +495,7 @@ class TestMessage:
             [TEST_MESSAGE_DICE, ContentType.DICE],
             [TEST_MESSAGE_WEB_APP_DATA, ContentType.WEB_APP_DATA],
             [TEST_FORUM_TOPIC_CREATED, ContentType.FORUM_TOPIC_CREATED],
+            [TEST_FORUM_TOPIC_EDITED, ContentType.FORUM_TOPIC_EDITED],
             [TEST_FORUM_TOPIC_CLOSED, ContentType.FORUM_TOPIC_CLOSED],
             [TEST_FORUM_TOPIC_REOPENED, ContentType.FORUM_TOPIC_REOPENED],
             [TEST_MESSAGE_UNKNOWN, ContentType.UNKNOWN],