~goorzhel/sota-slack-spotter

33bfb3b8723e223181dfe1c2935563b2480eb512 — Antonio Gurgel 2 months ago 0665ef4
Add reporting callsign to Spot
1 files changed, 3 insertions(+), 1 deletions(-)

M src/sota/spot.rs
M src/sota/spot.rs => src/sota/spot.rs +3 -1
@@ 36,6 36,7 @@ pub struct Spot {
    pub mode: Mode,
    #[serde(with = "time::serde::rfc3339")]
    pub time_stamp: OffsetDateTime,
    pub callsign: Callsign,
    pub comments: Option<String>,
}



@@ 64,10 65,11 @@ impl Display for Spot {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
        write!(
            f,
            "on {} MHz ({}) at {}",
            "on {} MHz ({}) at {} by {}",
            self.frequency,
            self.mode,
            self.format_timestamp(),
            self.callsign
        )?;
        if self.comments.is_some() {
            write!(f, " (\"{}\")", self.comments.as_ref().unwrap())?;