Skip to content

Commit

Permalink
fix compilation & test in production
Browse files Browse the repository at this point in the history
we at BežiDev approve of such practices
  • Loading branch information
mytja committed Nov 13, 2024
1 parent 151afe2 commit 2c211c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sharepoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"github.com/imroc/req/v3"
"net/http"
"os"
"regexp"
"strings"
"time"
)

Expand Down Expand Up @@ -359,15 +361,15 @@ func (server *httpImpl) GetSharepointNotificationsGoroutine(accessToken string)
}

// ker discord je pač retarded
r := regexp.MustCompile(`\[(?P<URL>.*)\]\(.*\)`, -1)
res := r.FindAllStringSubmatch(markdown)
r := regexp.MustCompile(`\[(?P<URL>.*)\]\(.*\)`)
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())
Expand Down

0 comments on commit 2c211c5

Please sign in to comment.