diff --git a/lib/signs/utilities/last_trip.ex b/lib/signs/utilities/last_trip.ex index d956e1a91..7b6660837 100644 --- a/lib/signs/utilities/last_trip.ex +++ b/lib/signs/utilities/last_trip.ex @@ -96,9 +96,8 @@ defmodule Signs.Utilities.LastTrip do message_string = Content.Message.to_string(message) if is_list(message_string) do - Enum.max_by(message_string, fn {string, _} -> String.length(string) end) - |> elem(0) - |> String.length() + Stream.map(message_string, fn {string, _} -> String.length(string) end) + |> Enum.max() else String.length(message_string) end