Created
November 7, 2022 01:52
-
-
Save cameri/bb39c79834fb1bafa2e28e7da4498b7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/webv2/damus.js b/webv2/damus.js | |
index 57e19dd..aae01ec 100644 | |
--- a/webv2/damus.js | |
+++ b/webv2/damus.js | |
@@ -225,7 +225,7 @@ function was_pubkey_notified(pubkey, ev) | |
function should_add_to_home(ev) | |
{ | |
- return ev.kind === 1 || ev.kind === 42 || ev.kind === 6 | |
+ return ev.kind === 1 || ev.kind === 2 || ev.kind === 42 || ev.kind === 6 | |
} | |
let rerender_home_timer | |
@@ -284,7 +284,7 @@ function send_home_filters(ids, model, relay) { | |
const contacts_filter = {kinds: [0], authors: friends} | |
const dms_filter = {kinds: [4], limit: 500} | |
const our_dms_filter = {kinds: [4], authors: [ model.pubkey ], limit: 500} | |
- const home_filter = {kinds: [1,42,6,7], authors: friends, limit: 500} | |
+ const home_filter = {kinds: [1,2,42,6,7], authors: friends, limit: 500} | |
const notifications_filter = {kinds: [1,42,6,7], "#p": [model.pubkey], limit: 100} | |
let home_filters = [home_filter] | |
@@ -686,7 +686,7 @@ function render_boost(model, ev, opts) { | |
//todo validate content | |
if (!ev.json_content) | |
return render_unknown_event(ev) | |
- | |
+ | |
const profile = model.profiles[ev.pubkey] | |
opts.is_boost_event = true | |
return ` | |
@@ -1036,7 +1036,7 @@ function is_video_url(path) { | |
return VID_REGEX.test(path) | |
} | |
-const URL_REGEX = /(https?:\/\/[^\s\):]+)/g; | |
+const URL_REGEX = /((http|ws)s?:\/\/[^\s\):]+)/g; | |
function linkify(text, show_media) { | |
return text.replace(URL_REGEX, function(url) { | |
const parsed = new URL(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment