From c7b2c8da60caba46f00508857a984ceb382cfe48 Mon Sep 17 00:00:00 2001
From: Andrei Kurilov <18027129+akurilov@users.noreply.github.com>
Date: Tue, 6 Aug 2024 17:54:30 +0300
Subject: [PATCH] feat: simplify the events format
---
service/messages/format.go | 6 +++---
service/messages/format_test.go | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/service/messages/format.go b/service/messages/format.go
index 5925b52..1615dee 100644
--- a/service/messages/format.go
+++ b/service/messages/format.go
@@ -144,11 +144,11 @@ func (f Format) convert(evt *pb.CloudEvent, subId, subDescr string, mode FormatM
addrInterest := "https://awakari.com/sub-details.html?id=" + subId
switch mode {
case FormatModeHtml:
- txt += "Original: " + obj + "\n"
- txt += "Interest: " + subDescr + "\n"
+ txt += "Original: " + obj + "\n\n"
+ txt += "Interest: " + subDescr + "\n\n"
txt += "All Event Attributes"
default:
- txt += "Original: " + obj + "\nInterest: " + addrInterest + "\nAll Event Attributes: " + addrEvtAttrs
+ txt += "Original: " + obj + "\n\nInterest: " + addrInterest + "\n\nAll Event Attributes: " + addrEvtAttrs
}
//
return
diff --git a/service/messages/format_test.go b/service/messages/format_test.go
index 5d4c8d1..ae83199 100644
--- a/service/messages/format_test.go
+++ b/service/messages/format_test.go
@@ -56,7 +56,7 @@ Increase your daily publication limit or nominate own sources for the dedicated
If you did not publish messages, check own publication sources you added.`,
},
},
- out: "⚠ Daily publishing limit reached.\n\nIncrease your daily publication limit or nominate own sources for the dedicated limit.\n\nIf you did not publish messages, 82f39262-5eb4-4f7f-9142-7c489d670907\n\nInterest: sub1 description",
+ out: "⚠ Daily publishing limit reached.\n\nIncrease your daily publication limit or nominate own source...\n\nOriginal: https://bbs.archlinux.org/extern.php?action=feed&fid=32&type=atom\n\nInterest: sub1 description\n\nAll Event Attributes",
},
}
for k, c := range cases {