aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/mail.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed/mail.go')
-rw-r--r--internal/feed/mail.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/internal/feed/mail.go b/internal/feed/mail.go
index 0360e10..190e1f2 100644
--- a/internal/feed/mail.go
+++ b/internal/feed/mail.go
@@ -31,10 +31,10 @@ func address(name, address string) []*mail.Address {
func (item *item) fromAddress() []*mail.Address {
switch {
- case item.Item.Author != nil && item.Item.Author.Email != "":
- return address(item.Item.Author.Name, item.Item.Author.Email)
- case item.Item.Author != nil && item.Item.Author.Name != "":
- return address(item.Item.Author.Name, item.defaultEmail())
+ case item.Author != nil && item.Author.Email != "":
+ return address(item.Author.Name, item.Author.Email)
+ case item.Author != nil && item.Author.Name != "":
+ return address(item.Author.Name, item.defaultEmail())
case item.Feed.Author != nil && item.Feed.Author.Email != "":
return address(item.Feed.Author.Name, item.Feed.Author.Email)
case item.Feed.Author != nil && item.Feed.Author.Name != "":
@@ -63,7 +63,7 @@ func (item *item) buildHeader() message.Header {
h.Set("Message-Id", item.messageId())
{ // date
- date := item.Item.PublishedParsed
+ date := item.PublishedParsed
if date == nil {
now := time.Now()
date = &now
@@ -71,12 +71,12 @@ func (item *item) buildHeader() message.Header {
h.SetDate(*date)
}
{ // subject
- subject := item.Item.Title
+ subject := item.Title
if subject == "" {
- subject = item.Item.Published
+ subject = item.Published
}
if subject == "" {
- subject = item.Item.Link
+ subject = item.Link
}
h.SetSubject(subject)
}
@@ -244,7 +244,7 @@ func (item *item) buildBody() {
panic(fmt.Sprintf("URL '%s' of feed '%s' is not a valid URL. How have we ended up here?", feed.Url, feed.Name))
}
- body := getBody(item.Item.Content, item.Item.Description, feed.Body)
+ body := getBody(item.Content, item.Description, feed.Body)
if !feed.InclImages {
item.Body = body
@@ -253,7 +253,7 @@ func (item *item) buildBody() {
doc, err := goquery.NewDocumentFromReader(strings.NewReader(body))
if err != nil {
- log.Errorf("Feed %s: Item %s: Error while parsing html content: %s", feed.Name, item.Item.Link, err)
+ log.Errorf("Feed %s: Item %s: Error while parsing html content: %s", feed.Name, item.Link, err)
if body != "" {
item.Body = "<br />" + body
}
@@ -273,7 +273,7 @@ func (item *item) buildBody() {
srcUrl, err := url.Parse(src)
if err != nil {
log.Errorf("Feed %s: Item %s: Error parsing URL '%s' embedded in item: %s",
- feed.Name, item.Item.Link, src, err)
+ feed.Name, item.Link, src, err)
return
}
imgUrl := feedUrl.ResolveReference(srcUrl)
@@ -281,7 +281,7 @@ func (item *item) buildBody() {
img, mime, err := getImage(imgUrl.String(), feed.Global.Timeout, feed.NoTLS)
if err != nil {
log.Errorf("Feed %s: Item %s: Error fetching image: %s",
- feed.Name, item.Item.Link, err)
+ feed.Name, item.Link, err)
return
}
if img == nil {
@@ -304,7 +304,7 @@ func (item *item) buildBody() {
if err != nil {
item.clearImages()
log.Errorf("Feed %s: Item %s: Error during rendering HTML: %s",
- feed.Name, item.Item.Link, err)
+ feed.Name, item.Link, err)
} else {
body = html
}
ref='/portato.git/commit/plugins/new_version.py?h=v0.14.1&id=6aa479f23289c5c812a7c2dd54f754aee28cd294&follow=1'>Fixed dependancy of the new_version plugin from "dev-util/git" to "dev-vcs/gi...Clement Bourgeois1-1/+1 2010-04-14Make some useless info messages being debug statementsRené 'Necoro' Neumann2-34/+17 2010-04-14Improve the C modulesRené 'Necoro' Neumann3-37/+52 2010-04-14Small modifications made to the French translation (typos, grammar).Clement Bourgeois1-69/+69 2010-04-14Fixed the unicode support and stuff ... and also made eix faster :)René 'Necoro' Neumann1-20/+22 2010-04-14Disable debug messages by defaultRené 'Necoro' Neumann1-1/+1 2010-04-13Better eix error inheritance and handlingRené 'Necoro' Neumann1-2/+9 2010-04-13Fix the handling of FilterSets. Fixes bug #558887.René 'Necoro' Neumann2-56/+64 2010-04-12Updated newsRené 'Necoro' Neumann1-0/+1 2010-04-13Added my name to translators list.Clement Bourgeois1-0/+1