feat: add support for commenting and reacting on external content

This commit is contained in:
codytseng 2025-11-15 16:26:19 +08:00
parent 5ba5c26fcd
commit 0bb62dd3fb
76 changed files with 1635 additions and 639 deletions

View file

@ -15,7 +15,12 @@ export function isOnionUrl(url: string): boolean {
export function normalizeUrl(url: string): string {
try {
if (url.indexOf('://') === -1) {
if (url.startsWith('localhost:') || url.startsWith('localhost/')) {
if (
url.startsWith('localhost:') ||
url.startsWith('localhost/') ||
url.startsWith('127.') ||
url.startsWith('192.168.')
) {
url = 'ws://' + url
} else {
url = 'wss://' + url