diff --git a/compiler/api/compiler.py b/compiler/api/compiler.py
index 192d6a67..150fa49d 100644
--- a/compiler/api/compiler.py
+++ b/compiler/api/compiler.py
@@ -408,7 +408,7 @@ def start(format: bool = False):
flag = FLAGS_RE_2.match(i[1])
if flag:
- if flag.group(2) == "true":
+ if flag.group(2) == "true" or flag.group(2).startswith("Vector"):
write_flags.append(f"flags |= (1 << {flag.group(1)}) if self.{i[0]} else 0")
else:
write_flags.append(f"flags |= (1 << {flag.group(1)}) if self.{i[0]} is not None else 0")
@@ -441,7 +441,7 @@ def start(format: bool = False):
sub_type = arg_type.split("<")[1][:-1]
write_types += "\n "
- write_types += f"if self.{arg_name} is not None:\n "
+ write_types += f"if self.{arg_name}:\n "
write_types += "b.write(Vector(self.{}{}))\n ".format(
arg_name, f", {sub_type.title()}" if sub_type in CORE_TYPES else ""
)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 6d1a462c..2c85c00f 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "1.3.4"
+__version__ = "1.3.5"
__license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
__copyright__ = "Copyright (C) 2017-present Dan "