Skip to content

Commit 4b22095

Browse files
committed
fix reply message
1 parent 6674b3d commit 4b22095

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Events/MessageNew.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class MessageNew implements ICompatibleEvent
3333
private object $geo;
3434
private object $payload;
3535
private array $fwd_messages;
36-
private array $reply_message;
36+
private object $reply_message;
3737
private object $action;
3838
private int $admin_author_id;
3939
private int $conversation_message_id;
@@ -142,17 +142,17 @@ public function getPayload(): ?object
142142
}
143143

144144
/**
145-
* @return array
145+
* @return array|null
146146
*/
147-
public function getFwdMessages(): array
147+
public function getFwdMessages(): ?array
148148
{
149149
return $this->getField("fwd_messages");
150150
}
151151

152152
/**
153153
* @return array|null
154154
*/
155-
public function getReplyMessage(): ?array
155+
public function getReplyMessage(): ?object
156156
{
157157
return $this->getField("reply_message");
158158
}
@@ -174,9 +174,9 @@ public function getAdminAuthorId(): ?int
174174
}
175175

176176
/**
177-
* @return int
177+
* @return int|null
178178
*/
179-
public function getConversationMessageId(): int
179+
public function getConversationMessageId(): ?int
180180
{
181181
return $this->getField("conversation_message_id");
182182
}

tests/MessageNewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testGetId(): void
110110

111111
public function testGetReplyMessage(): void
112112
{
113-
self::assertIsArray($this->m->getReplyMessage());
113+
self::assertIsObject($this->m->getReplyMessage());
114114
}
115115

116116
public function testGetConversationMessageId(): void

0 commit comments

Comments
 (0)