Changeset - b84f495d82ce
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2019-12-07 04:20:58
mads@kiilerich.com
Grafted from: 48abbc85bca4
journal: don't include email in author name - avoid double data

In journal RSS feed, report author as:
<author>name@example.com (User Name)</author>
instead of double email due to:
<author>name@example.com (User Name &lt;name@example.com&gt;)</author>

In the journal ATOM feed, report author as:
<author>
<name>user Name</name>
<email>test_admin@example.com</email>
</author>
instead of using double email due to:
<name>name@example.com (User Name &lt;name@example.com&gt;)</name>
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/journal.py
Show inline comments
 
@@ -125,25 +125,25 @@ class JournalController(BaseController):
 
            action, action_extra, ico = h.action_parser(entry, feed=True)
 
            title = "%s - %s %s" % (user.short_contact, action(),
 
                                    entry.repository.repo_name)
 
            _url = None
 
            if entry.repository is not None:
 
                _url = h.canonical_url('changelog_home',
 
                           repo_name=entry.repository.repo_name)
 

	
 
            feed.add_item(title=title,
 
                          pubdate=entry.action_date,
 
                          link=_url or h.canonical_url(''),
 
                          author_email=user.email,
 
                          author_name=user.full_contact,
 
                          author_name=user.full_name_or_username,
 
                          description=action_extra())
 

	
 
        response.content_type = feed.mime_type
 
        return feed.writeString('utf-8')
 

	
 
    def _atom_feed(self, repos, public=True):
 
        if public:
 
            link = h.canonical_url('public_journal_atom')
 
            desc = '%s %s %s' % (c.site_name, _('Public Journal'),
 
                                  'atom feed')
 
        else:
 
            link = h.canonical_url('journal_atom')
0 comments (0 inline, 0 general)