added shortParentCid to Thread

This commit is contained in:
plebbitor
2023-04-17 10:36:13 +02:00
parent a6a0e62ccf
commit 69d59f79fc
3 changed files with 12 additions and 4 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
function findParentShortCid(parentCid, selectedFeed) {
for (const thread of selectedFeed) {
function findParentShortCid(parentCid, input) {
const feed = Array.isArray(input) ? input : [input];
for (const thread of feed) {
if (thread.cid === parentCid) {
return thread.shortCid;
}