mirror of https://github.com/jlelse/GoBlog
Ellipsize long webmention titles
This commit is contained in:
parent
eeb68dbba9
commit
93f512dd40
|
@ -83,6 +83,9 @@ func (m *mention) verifyMention() error {
|
||||||
if len(m.Content) > 500 {
|
if len(m.Content) > 500 {
|
||||||
m.Content = m.Content[0:497] + "…"
|
m.Content = m.Content[0:497] + "…"
|
||||||
}
|
}
|
||||||
|
if len(m.Title) > 60 {
|
||||||
|
m.Title = m.Title[0:57] + "…"
|
||||||
|
}
|
||||||
newStatus := webmentionStatusVerified
|
newStatus := webmentionStatusVerified
|
||||||
if strings.HasPrefix(m.Source, appConfig.Server.PublicAddress) {
|
if strings.HasPrefix(m.Source, appConfig.Server.PublicAddress) {
|
||||||
// Approve if it's server-intern
|
// Approve if it's server-intern
|
||||||
|
|
Loading…
Reference in New Issue