add blacklist model and refactor channel kind 43 43

This commit is contained in:
Ren Amamiya
2023-04-25 12:51:56 +07:00
parent cf26aa504e
commit 95e4a27b69
6 changed files with 96 additions and 32 deletions

View File

@@ -20,6 +20,16 @@ export const arrayToNIP02 = (arr: string[]) => {
return nip02_arr;
};
// convert array object to pure array
export const arrayObjToPureArr = (arr: any) => {
const pure_arr = [];
arr.forEach((item) => {
pure_arr.push(item.content);
});
return pure_arr;
};
// get parent id from event tags
export const getParentID = (arr: string[], fallback: string) => {
const tags = destr(arr);