inculi / Sue

A bot for iMessage (sue@robertism.com), Telegram (@ImSueBot), and Discord. Now in Elixir!
MIT License
28 stars 9 forks source link

imessage body sometimes nil #57

Open Manwholikespie opened 1 year ago

Manwholikespie commented 1 year ago

Some new message case I haven't seen before. Check the info logs later I guess.

Last message: :get_updates
04:51:40.684 [error] GenServer Sue.Mailbox.IMessage terminating
** (FunctionClauseError) no function clause matching in Sue.Models.Message.better_trim_leading/1
    (sue 0.2.3) lib/sue/models/message.ex:323: Sue.Models.Message.better_trim_leading(nil)
    (sue 0.2.3) lib/sue/models/message.ex:350: Sue.Models.Message.has_command?/2
    (sue 0.2.3) lib/sue/models/message.ex:301: Sue.Models.Message.command_args_from_body/2
    (sue 0.2.3) lib/sue/models/message.ex:93: Sue.Models.Message.from_imessage/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (sue 0.2.3) lib/sue/mailbox/i_message.ex:116: Sue.Mailbox.IMessage.process_messages/1
    (sue 0.2.3) lib/sue/mailbox/i_message.ex:27: Sue.Mailbox.IMessage.handle_info/2
    (stdlib 4.2) gen_server.erl:1123: :gen_server.try_dispatch/4
Last message: :get_updates