Skip to content

Commit 6f0859b

Browse files
committed
Allow passing a string to textWithEntities, small updates fix
1 parent b334376 commit 6f0859b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/Loop/Update/UpdateLoop.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public function loop(): ?float
105105
return self::PAUSE;
106106
}
107107
$this->API->feeders[$this->channelId] ??= new FeedLoop($this->API, $this->channelId);
108+
$this->API->updaters[$this->channelId] ??= new UpdateLoop($this->API, $this->channelId);
108109

109110
$this->feeder = $this->API->feeders[$this->channelId];
110111
$state = $this->channelId === self::GENERIC ? $this->API->loadUpdateState() : $this->API->loadChannelState($this->channelId);

src/TL/TL.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,8 @@ public function serializeObject(array $type, mixed $object, string|int $ctx, int
616616
}
617617
if ($type['type'] === 'InputMessage' && !\is_array($object)) {
618618
$object = ['_' => 'inputMessageID', 'id' => $object];
619+
} elseif ($type['type'] === 'TextWithEntities' && !\is_array($object)) {
620+
$object = ['_' => 'textWithEntities', 'text' => $object];
619621
} elseif (isset($this->typeMismatch[$type['type']]) && (!\is_array($object) || isset($object['_']) && $this->constructors->findByPredicate($object['_'])['type'] !== $type['type'])) {
620622
$object = $this->typeMismatch[$type['type']]($object);
621623
if (!isset($object['_'])) {

0 commit comments

Comments
 (0)