ker0x/messenger

0 is an empty text

Khodl opened this issue · 0 comments

Khodl commented

Sometimes a user may want to send the text "0", which is detected as empty in this line: https://github.com/ker0x/messenger/blob/master/src/Model/Callback/Message.php#L85

I'm not sure it's the expected behaviour (even if it's PHP's empty normal behaviour) in a chat situation.

Probably if it's a Message event, it means that there is at least at text and we shouldn't even test hasText. Is it sure enough to trust that? Or is it possible that there are only attachments without text?