From 29dcc86af8b0bc36130e325d9b6e7f4d3f5f0564 Mon Sep 17 00:00:00 2001 From: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com> Date: Mon, 16 Oct 2023 00:09:59 -0700 Subject: [PATCH] fix: Re-packaged application PKGBUILD and fixed error with empty calendar event names --- PKGBUILD | 4 ++-- calendar/calendarevent.go | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 17c73f0..744edb3 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Nicholas Novak pkgname=assign-notify -pkgver=r2.582eaf6 +pkgver=r4.fcc94ca pkgrel=1 pkgdesc="Assignment Notifier CLI" arch=('any') @@ -10,7 +10,7 @@ provides=('assign-notify') depends=('go') url="https://gitlab.nicholasnovak.io/nnovak/assign-notify" source=( - "assign-notify::git+ssh://git@ssh-gitlab.nicholasnovak.io:1022/nnovak/assign-notify.git" + "assign-notify::git+https://git.nicholasnovak.io/nnovak/assign-notify.git" ) md5sums=('SKIP') diff --git a/calendar/calendarevent.go b/calendar/calendarevent.go index a77c756..e8ffd4e 100644 --- a/calendar/calendarevent.go +++ b/calendar/calendarevent.go @@ -101,8 +101,14 @@ func FromVEvent(external *ics.VEvent) (event CalendarEvent, err error) { } case "CATEGORIES": dashIndex := strings.Index(prop.Value, "-") - event.Category.ClassName = prop.Value[:dashIndex] - event.Category.OtherData = prop.Value[dashIndex:] + + // If there was no dash found, treat the property as its entire name + if dashIndex == -1 { + event.Category.ClassName = prop.Value + } else { + event.Category.ClassName = prop.Value[:dashIndex] + event.Category.OtherData = prop.Value[dashIndex:] + } default: panic("Unknown token when parsing event: " + prop.IANAToken) }