From 3de679b56007edc0411a3c6d5c862db0525512a0 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 18 Aug 2020 11:05:10 +0300 Subject: [PATCH] Fix MessageEntity::get_type_priority. GitOrigin-RevId: 175f6e2f1f97e87309add8314321934d744b0493 --- td/telegram/MessageEntity.cpp | 2 +- td/telegram/MessageEntity.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp index 4b3e29465..53db4f05c 100644 --- a/td/telegram/MessageEntity.cpp +++ b/td/telegram/MessageEntity.cpp @@ -25,7 +25,7 @@ namespace td { int MessageEntity::get_type_priority(Type type) { - static const int types[] = {50, 50, 50, 50, 50, 90, 91, 20, 11, 10, 49, 49, 50, 50, 92, 93, 0}; + static const int types[] = {50, 50, 50, 50, 50, 90, 91, 20, 11, 10, 49, 49, 50, 50, 92, 93, 0, 50}; return types[static_cast(type)]; } diff --git a/td/telegram/MessageEntity.h b/td/telegram/MessageEntity.h index ea9229509..7a1d5e9cf 100644 --- a/td/telegram/MessageEntity.h +++ b/td/telegram/MessageEntity.h @@ -28,6 +28,7 @@ class ContactsManager; class MessageEntity { public: + // don't forget to update get_type_priority() enum class Type : int32 { Mention, Hashtag,