diff --git a/lib/signs/utilities/last_trip.ex b/lib/signs/utilities/last_trip.ex index 50c392779..ce23045e1 100644 --- a/lib/signs/utilities/last_trip.ex +++ b/lib/signs/utilities/last_trip.ex @@ -97,9 +97,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