diff --git a/sharepoint.go b/sharepoint.go index 7b7551c..9ba5d46 100644 --- a/sharepoint.go +++ b/sharepoint.go @@ -12,6 +12,8 @@ import ( "github.com/imroc/req/v3" "net/http" "os" + "regexp" + "strings" "time" ) @@ -359,15 +361,15 @@ func (server *httpImpl) GetSharepointNotificationsGoroutine(accessToken string) } // ker discord je pač retarded - r := regexp.MustCompile(`\[(?P.*)\]\(.*\)`, -1) - res := r.FindAllStringSubmatch(markdown) + r := regexp.MustCompile(`\[(?P.*)\]\(.*\)`) + res := r.FindAllStringSubmatch(markdown, -1) for _, l := range res { if len(l) < 2 { continue } markdown = strings.ReplaceAll(markdown, l[0], l[1]) } - + notificationResponse.Fields.Body = markdown expires := int(notificationResponse.Fields.Expires.Unix())