(ts: number)
| 103 | } |
| 104 | |
| 105 | function formatTimestamp(ts: number): string { |
| 106 | const d = new Date(ts * 1000) |
| 107 | const M = d.getMonth() + 1 |
| 108 | const D = d.getDate() |
| 109 | const h = String(d.getHours()).padStart(2, '0') |
| 110 | const m = String(d.getMinutes()).padStart(2, '0') |
| 111 | return `${M}/${D} ${h}:${m}` |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Format messages as compact plain text with consecutive-sender merging. |