Skip to content

Commit 44b6aad

Browse files
committed
Fix personal calendar event edit link
1 parent fb4eaed commit 44b6aad

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

StartSch/Controllers/IcsController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ public async Task<ActionResult<string>> GetPersonalCalendarCategoryIcs(int categ
132132
{
133133
Properties = { new CalendarProperty("X-WR-CALNAME", $"StartSCH | {category.Name}") },
134134
};
135-
var publicUrl = options.Value.PublicUrl.TryRemoveFromStart("https://").ToString();
135+
var publicUrl = options.Value.PublicUrl;
136+
var publicUrlWithoutScheme = publicUrl.TryRemoveFromStart("https://").ToString();
136137
var editorToken = new PersonalCalendarEditorToken(user.Id, requestToken.AesKey)
137138
.Serialize(dataProtectionProvider);
138139

@@ -158,7 +159,7 @@ await Task.WhenAll(
158159
var description = root.ToHtmlString();
159160
return new CalendarEvent
160161
{
161-
Uid = $"{modifiedEvent.SourceCalendar.Id}/{modifiedEvent.Id.Replace('@', '_')}@{publicUrl}",
162+
Uid = $"{modifiedEvent.SourceCalendar.Id}/{modifiedEvent.Id.Replace('@', '_')}@{publicUrlWithoutScheme}",
162163
Start = new(modifiedEvent.Start.ToDateTimeUtc()),
163164
End = new(modifiedEvent.End.ToDateTimeUtc()),
164165
Summary = modifiedEvent.Title,

0 commit comments

Comments
 (0)