package main // Telling the person (design 08 sign-in-page ยง19): org.freedesktop.Notifications.Notify on the session's bus, the // desktop notification service, app_name mesh. import "github.com/godbus/dbus/v5" func notifyOn(bus string, n note) error { conn, err := dbus.Connect(bus) if err != nil { return err } defer conn.Close() hints := map[string]dbus.Variant{} if n.Critical { hints["urgency"] = dbus.MakeVariant(byte(2)) } return conn.Object("org.freedesktop.Notifications", "/org/freedesktop/Notifications"). Call("org.freedesktop.Notifications.Notify", 0, "mesh", uint32(0), "", n.Summary, n.Body, []string{}, hints, int32(-1)).Err }