Fix following.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3763 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-01-15 18:02:05 +00:00
parent 019ab99ecc
commit b8068b9ed1
2 changed files with 12 additions and 10 deletions

View File

@ -374,15 +374,17 @@ ssb.addEventListener('message', async function(id) {
});
async function addAppSources(message) {
for (let mention of message.mentions) {
if (mention.type == 'application/tildefriends') {
var blob = await ssb.blobGet(mention.link);
var json = JSON.parse(utf8Decode(blob));
for (let file of Object.keys(json.files)) {
message.mentions.push({
name: file,
link: json.files[file],
});
if (message.mentions) {
for (let mention of message.mentions) {
if (mention.type == 'application/tildefriends') {
var blob = await ssb.blobGet(mention.link);
var json = JSON.parse(utf8Decode(blob));
for (let file of Object.keys(json.files)) {
message.mentions.push({
name: file,
link: json.files[file],
});
}
}
}
}