mirror of
https://github.com/smolgrrr/TAO.git
synced 2024-09-20 09:21:25 +00:00
change censorship
This commit is contained in:
parent
684bc9fdc2
commit
c664a20681
@ -30,7 +30,6 @@ const QuoteEmbed = ({
|
|||||||
<div className="flex flex-col break-words">
|
<div className="flex flex-col break-words">
|
||||||
<ContentPreview key={event.id} eventdata={event} />
|
<ContentPreview key={event.id} eventdata={event} />
|
||||||
</div>
|
</div>
|
||||||
{renderMedia(files)}
|
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
{metadataParsed ?
|
{metadataParsed ?
|
||||||
<img
|
<img
|
||||||
|
@ -85,7 +85,7 @@ const ContentPreview = ({ key, eventdata }: { key: string; eventdata: Event }) =
|
|||||||
{isExpanded ? "...Read less" : "...Read more"}
|
{isExpanded ? "...Read less" : "...Read more"}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{url !== "" && <LinkModal key={key} url={url} />}
|
{/* {url !== "" && <LinkModal key={key} url={url} />} */}
|
||||||
{quoteEvents[0] && quoteEvents.length > 0 && (
|
{quoteEvents[0] && quoteEvents.length > 0 && (
|
||||||
<a href={`/thread/${nip19.noteEncode(quoteEvents[0].id)}`}>
|
<a href={`/thread/${nip19.noteEncode(quoteEvents[0].id)}`}>
|
||||||
<QuoteEmbed
|
<QuoteEmbed
|
||||||
|
@ -42,7 +42,6 @@ const PostCard = ({
|
|||||||
<div className={`flex flex-col break-words ${type !== "OP" ? 'hover:cursor-pointer' : ''}`} onClick={handleClick}>
|
<div className={`flex flex-col break-words ${type !== "OP" ? 'hover:cursor-pointer' : ''}`} onClick={handleClick}>
|
||||||
<ContentPreview key={event.id} eventdata={event} />
|
<ContentPreview key={event.id} eventdata={event} />
|
||||||
</div>
|
</div>
|
||||||
{renderMedia(files)}
|
|
||||||
{repliedTo && <div className="flex items-center mt-1" >
|
{repliedTo && <div className="flex items-center mt-1" >
|
||||||
<span className="text-xs text-gray-500">Reply to: </span>
|
<span className="text-xs text-gray-500">Reply to: </span>
|
||||||
{uniqBy(repliedTo, 'pubkey').map((event, index) => (
|
{uniqBy(repliedTo, 'pubkey').map((event, index) => (
|
||||||
|
@ -56,7 +56,6 @@ const RepostCard = ({
|
|||||||
<div className={`flex flex-col break-words hover:cursor-pointer`} onClick={handleClick}>
|
<div className={`flex flex-col break-words hover:cursor-pointer`} onClick={handleClick}>
|
||||||
<ContentPreview key={repostedEvent.id} eventdata={repostedEvent} />
|
<ContentPreview key={repostedEvent.id} eventdata={repostedEvent} />
|
||||||
</div>
|
</div>
|
||||||
{renderMedia(files)}
|
|
||||||
<div className={`flex justify-between items-center hover:cursor-pointer`} onClick={handleClick}>
|
<div className={`flex justify-between items-center hover:cursor-pointer`} onClick={handleClick}>
|
||||||
{metadata ?
|
{metadata ?
|
||||||
<img
|
<img
|
||||||
|
@ -7,12 +7,12 @@ function extractMediaUrls(content: string): string[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function parseContent(event: Event) {
|
export function parseContent(event: Event) {
|
||||||
const files = extractMediaUrls(event.content);
|
const files: string[] = []; // extractMediaUrls(event.content);
|
||||||
let contentWithoutFiles = event.content;
|
let contentWithoutFiles = event.content;
|
||||||
|
|
||||||
files.forEach(file => {
|
// files.forEach(file => {
|
||||||
contentWithoutFiles = contentWithoutFiles.replace(file, '');
|
// contentWithoutFiles = contentWithoutFiles.replace(file, '');
|
||||||
});
|
// });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
comment: contentWithoutFiles.trim(),
|
comment: contentWithoutFiles.trim(),
|
||||||
|
@ -11,7 +11,7 @@ type Subscribe = {
|
|||||||
unsub?: boolean;
|
unsub?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const blacklistUrl = ["lain.la", "casualcrypto.date", "files.catbox.moe", "i.ibb.co", "matrix"];
|
const blacklistUrl = ["lain.la", "casualcrypto.date", "files.catbox.moe", "i.ibb.co", "matrix", "dump.li", "files.v0l.io"];
|
||||||
|
|
||||||
const subList: Array<Subscription> = [];
|
const subList: Array<Subscription> = [];
|
||||||
const currentSubList: Array<Subscribe> = [];
|
const currentSubList: Array<Subscribe> = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user