Improve condition for using full type name.

This commit is contained in:
levlam 2024-03-22 22:55:32 +03:00
parent 8bf00d067f
commit 323e82d099
2 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ EOT
protected function addFieldDocumentation($class_name, $field_name, $type_name, $field_info, $may_be_null)
{
$end = ';';
if (substr($type_name, 0, strlen($field_name)) === $field_name) {
if ($type_name == $field_name.'^' || ($type_name == 'Message^' && $field_name == 'ReplyToMessage')) {
$type_name = '::Telegram::Td::Api::'.$type_name;
$end = ' {';
}

View File

@ -244,7 +244,7 @@ class TlWriterDotNet final : public TL_writer {
if (field_name == class_name) {
fixed_field_name += "Value";
}
if (type_name.substr(0, field_name.size()) == field_name) {
if (type_name == field_name + "^" || (type_name == "Message^" && field_name == "ReplyToMessage")) {
auto fixed_type_name = "::Telegram::Td::Api::" + type_name;
std::stringstream ss;
ss << "private:\n";