diff --git a/lib/convertv2.js b/lib/convertv2.js
index cd69978..d6d6490 100644
--- a/lib/convertv2.js
+++ b/lib/convertv2.js
@@ -113,7 +113,6 @@ function metaForUser(user) {
}
}
-// TODO make function
async function itemsForFeed(opts,user,feed) {
var items = feed.orderedItems;
@@ -189,9 +188,10 @@ async function itemsForFeed(opts,user,feed) {
hasCw:item.object.sensitive||false,
cw:item.object.summary,
content: item.object&&item.object.content?item.object.content:'',//TODO sanitize then render without entity escapes
- atomHref:item.published?item.published.replace(/\W+/g,''):Math.random().toString().replace('.',''),
+ atomHref:item.published?item.published.replace(/\W+/g,''):Math.random().toString().replace('.',''),// used for IDs
enclosures:enclosures,
stringDate:item.published?getTimeDisplay(Date.parse(item.published)):'',
+ permalink:item.object.id?item.object.id:'#',
author:{
uri:op.url,// link to author page
avatar:op.icon&&op.icon.url?op.icon.url:'',
@@ -202,7 +202,6 @@ async function itemsForFeed(opts,user,feed) {
})
}
-// TODO
function getNextPage(opts,user,feed){
//based on feed.next
// take feed.next, uriencode it, then take user url, then take options.mastofeedUrl
diff --git a/lib/template.ejs b/lib/template.ejs
index c49ce32..31f3b21 100644
--- a/lib/template.ejs
+++ b/lib/template.ejs
@@ -73,7 +73,9 @@
<% for (var i = 0; i < item.enclosures.length; i ++){ %>
<% var e = item.enclosures[i] %>
- <% if (e.type.indexOf('video') > -1){ %>
+ <% if (e.type.indexOf('audio') > -1) {%>
+
+ <% }else if (e.type.indexOf('video') > -1){ %>
<% } else { %>
@@ -87,7 +89,7 @@
<% } %>