Skip to content

Commit 93b9161

Browse files
committed
Improving format of the note
1 parent 91a5f0a commit 93b9161

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

src/Rss2Outbox/Rss2Outbox.sln

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ VisualStudioVersion = 17.8.34511.84
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Rss2Outbox", "Rss2Outbox.csproj", "{B27C7467-1143-4642-A265-6B8129D51986}"
77
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ActivityPubDotNet.Core", "..\ActivityPubDotNet.Core\ActivityPubDotNet.Core.csproj", "{D98BA271-7F4F-4874-AF4C-457DED893A0F}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ActivityPubDotNet", "..\ActivityPubFunctions\ActivityPubDotNet.csproj", "{995B5DF1-9D12-4A5A-9CCD-1DC86B26B431}"
11+
EndProject
812
Global
913
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1014
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +19,14 @@ Global
1519
{B27C7467-1143-4642-A265-6B8129D51986}.Debug|Any CPU.Build.0 = Debug|Any CPU
1620
{B27C7467-1143-4642-A265-6B8129D51986}.Release|Any CPU.ActiveCfg = Release|Any CPU
1721
{B27C7467-1143-4642-A265-6B8129D51986}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{D98BA271-7F4F-4874-AF4C-457DED893A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{D98BA271-7F4F-4874-AF4C-457DED893A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{D98BA271-7F4F-4874-AF4C-457DED893A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{D98BA271-7F4F-4874-AF4C-457DED893A0F}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{995B5DF1-9D12-4A5A-9CCD-1DC86B26B431}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{995B5DF1-9D12-4A5A-9CCD-1DC86B26B431}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{995B5DF1-9D12-4A5A-9CCD-1DC86B26B431}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{995B5DF1-9D12-4A5A-9CCD-1DC86B26B431}.Release|Any CPU.Build.0 = Release|Any CPU
1830
EndGlobalSection
1931
GlobalSection(SolutionProperties) = preSolution
2032
HideSolutionNode = FALSE

src/Rss2Outbox/RssUtils.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
using System;
21
using System.Text;
3-
using System.Numerics;
42
using System.Security.Cryptography;
5-
using System.Collections.Generic;
6-
using System.Text.Json;
7-
using System.Xml.Linq;
8-
using System.CommandLine.Parsing;
9-
using System.CommandLine;
10-
using System.Linq;
113

124
namespace Rss2Outbox
135
{
146
public static class RssUtils
157
{
168
public static string GetContent(dynamic item, string baseTagUrl, string authorName, string authorUri)
179
{
18-
var contentTemplate = "<p>{0}</p><p>{1}</p><p>Full article by {2}: <a href='{3}'>{3}</a></p><p>{4}</p>";
10+
var contentTemplate = "<p>{0}</p><p>{1}</p><p> Link: <a href='{3}'>{3}</a> by {2}:</p><p>{4}</p>";
1911

2012
var tags = string.Empty;
2113

@@ -29,9 +21,11 @@ public static string GetContent(dynamic item, string baseTagUrl, string authorNa
2921
}
3022
}
3123

24+
string description = item!.Description?.ToString() ?? string.Empty;
25+
3226
var content = string.Format(contentTemplate,
3327
item!.Title!,
34-
item!.Description!,
28+
description.Replace("\n", "</p></p>"),
3529
GetMention(authorName, authorUri),
3630
item!.Link!,
3731
tags);

0 commit comments

Comments
 (0)