Fix incorrect icon display for "Other SSIDs" on info page

The get_other_ssids function wasn't fetching symbol information from
the database, causing icons to display incorrectly. Updated the query
to include symbol_table_id and symbol_code fields and added them to
the packet struct so render_symbol_html can properly display the icons.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-19 17:55:42 -05:00
parent a0c2970b42
commit c8bd7980c2
No known key found for this signature in database

View file

@ -247,7 +247,7 @@ defmodule AprsmeWeb.InfoLive.Show do
query = """
WITH recent_ssids AS (
SELECT DISTINCT ON (sender)
sender, ssid, received_at, id
sender, ssid, received_at, id, symbol_table_id, symbol_code
FROM packets
WHERE base_callsign = $1
AND received_at >= $2
@ -261,13 +261,15 @@ defmodule AprsmeWeb.InfoLive.Show do
case Repo.query(query, [base_callsign, one_hour_ago, callsign]) do
{:ok, result} ->
Enum.map(result.rows, fn [sender, ssid, received_at, id] ->
Enum.map(result.rows, fn [sender, ssid, received_at, id, symbol_table_id, symbol_code] ->
# Create a minimal packet struct for display
packet = %Packet{
id: id,
sender: sender,
ssid: ssid,
received_at: received_at
received_at: received_at,
symbol_table_id: symbol_table_id,
symbol_code: symbol_code
}
%{