back interdiff of round #13 and #12

appview/notify: notify users mentioned on PR comments #739

merged
opened by boltless.me targeting master from feat/mentions
files
appview
notify
pages
markup
pulls
ERROR
appview/notify/db/db.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/merged_notifier.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/notifier.go

Failed to calculate interdiff for this file.

ERROR
appview/notify/posthog/notifier.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/markup/extension/atlink.go

Failed to calculate interdiff for this file.

REVERTED
appview/pages/markup/markdown.go
···
return path.Join(rctx.CurrentDir, dst)
}
-
// FindUserMentions returns Set of user handles from given markup soruce.
-
// It doesn't guarntee unique DIDs
-
func FindUserMentions(source string) []string {
-
var (
-
mentions []string
-
mentionsSet = make(map[string]struct{})
-
md = NewMarkdown()
-
sourceBytes = []byte(source)
-
root = md.Parser().Parse(text.NewReader(sourceBytes))
-
)
-
ast.Walk(root, func(n ast.Node, entering bool) (ast.WalkStatus, error) {
-
if entering && n.Kind() == textension.KindAt {
-
handle := n.(*textension.AtNode).Handle
-
mentionsSet[handle] = struct{}{}
-
return ast.WalkSkipChildren, nil
-
}
-
return ast.WalkContinue, nil
-
})
-
for handle := range mentionsSet {
-
mentions = append(mentions, handle)
-
}
-
return mentions
-
}
-
func isAbsoluteUrl(link string) bool {
parsed, err := url.Parse(link)
if err != nil {
···
return path.Join(rctx.CurrentDir, dst)
}
func isAbsoluteUrl(link string) bool {
parsed, err := url.Parse(link)
if err != nil {
ERROR
appview/pulls/pulls.go

Failed to calculate interdiff for this file.