forked from an/flokati
fix
This commit is contained in:
parent
ab6d7b1a27
commit
d01fbb8ce8
|
@ -74,13 +74,14 @@ func rssItemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, ni := range newitems {
|
for _, ni := range newitems {
|
||||||
ti := ni.Title
|
ti := ni.Title
|
||||||
if len(ti) > 80 {
|
short := ""
|
||||||
runes := []rune(ti)
|
if len(ti) > 80 {
|
||||||
short := string(runes[0:80])
|
runes := []rune(ti)
|
||||||
} else {
|
short = string(runes[0:80])
|
||||||
short := ti
|
} else {
|
||||||
}
|
short = ti
|
||||||
|
}
|
||||||
SayCh <- fmt.Sprintf("%s\n[RSS] %v - %v", *rssChannel, short, ni.Links[0].Href)
|
SayCh <- fmt.Sprintf("%s\n[RSS] %v - %v", *rssChannel, short, ni.Links[0].Href)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue