Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
500dbf5
implement proxy option #218 (and partially auto-apply modern rust fmt)
Jun 8, 2026
9140563
implement websocket proxy (part 2/2) #218
Jun 8, 2026
e5b0b06
cleanup: resolve optional tls feature dependencies; switch `native-tl…
Jun 8, 2026
9b82eda
remove extra dependency #218
Jun 8, 2026
6dd1a41
implement `rustls-tls` and `rustls-tls-native` features; switch back …
Jun 8, 2026
76bc369
use default crypto provider #218
Jun 8, 2026
7dfd25f
prefer minor versions for new deps (as everywhere) #218
Jun 8, 2026
0177891
add comment to the newly added crates block #218
Jun 8, 2026
aafeb8c
implement missed no proxy case handle #218
Jun 9, 2026
46823fe
implement "No proxy for URL starts with" option; add debug messages; …
Jun 9, 2026
7a0de17
move Stream imp to separated mod file #218
Jun 9, 2026
003f127
add missed socks5h_client type initiation #218
Jun 9, 2026
7e5302d
apply clippy to `gossip-lib` crate
Jun 9, 2026
13d3dc6
fix typo in hint #218
Jun 9, 2026
6788e6a
Format the IPv6 socket host notation returned with brackets from `htt…
Jun 9, 2026
432783c
implement seen on counter
Jun 11, 2026
9ae810c
add custom logo
Jun 13, 2026
d2175bd
upload to all blossom servers in settings list; improve event debug; …
Jun 13, 2026
5946e38
Merge pull request #1 from YGGverse/multimple-blossom-upload
oooo-ps Jun 14, 2026
1b06c77
fix ipv6 links parser by using `andrewsuperlegit/linkify` patch until…
Jun 14, 2026
50317c4
add local branch with I2P and IPv6 features until stable linkify depe…
Jun 16, 2026
6697fb4
update `nostr-types` revision that includes I2P + IPv6 patch;
Jun 16, 2026
ccf7b3f
apply clippy
Jun 16, 2026
9eddf6f
fix proxy conditions; add missed cases; minor blossom instance refactory
Jun 16, 2026
2ef7c37
implement regex multiline filter for proxy exceptions
Jun 16, 2026
ae2e2ad
init RelayList::default() on `relay_lists` is empty to prevent panic …
Jun 17, 2026
79f9b8c
fix invalidate nip-05 condition; add some debug messages; minor code …
Jun 17, 2026
774aa36
move nostr-types to sub-crate
Jun 17, 2026
e63e4ad
use hashmap to prevent seen duplicates; partial impl
Jun 17, 2026
9d4587c
complete Vec > IndexSet migration for the Relay indexes
Jun 17, 2026
1975de1
use extension to prevent analyzer issues
Jun 17, 2026
f12efce
move records to parent manifest
Jun 17, 2026
f56a376
use ordered IndexMap instead of HashMap
Jun 17, 2026
fdb4168
minor code optimizations
Jun 17, 2026
b5f6b24
fix relay seen list update
Jun 17, 2026
893497f
upgrade deprecated method; use const for shared bytes len value
Jun 17, 2026
4f14c28
rollback inbox filter condition
Jun 17, 2026
8fbb8c9
Merge pull request #2 from YGGverse/index-set
oooo-ps Jun 18, 2026
76ff2d5
hide views indicator when its value is unknown
Jun 18, 2026
18bb91f
do not overwrite existing `seen on` values for event
Jun 18, 2026
7946303
initial commit
Jun 19, 2026
7faabaf
Merge pull request #3 from YGGverse/nip-92
oooo-ps Jun 19, 2026
b402bdd
show link address on hover tooltip; unify case
Jun 20, 2026
6012794
remove scopes as not useful in long blossom/sha256 context; enshort p…
Jun 20, 2026
7a01aa0
format tooltips; move link details from button to hover text in conte…
Jun 20, 2026
988c4e2
hide empty tooltip if no reactions; hide zaps counter on its value is…
Jun 20, 2026
6b0bf9a
use fork logo
Jun 20, 2026
c2c4186
add onhover url tooltip for links if mismatches alt; add contribution…
Jun 20, 2026
904e752
rollback nip-92 impl for blossom; use mime_guess crate to detect mime…
Jun 20, 2026
38b7b27
fix debug message; use derived const
Jun 20, 2026
ead5cf0
minor optimizations
Jun 20, 2026
f4e5116
implement fallback urls for blossom uploads
Jun 20, 2026
51af7b2
add missed `blossom` clear function
Jun 20, 2026
cf313ca
add debug messages; minor logic corrections
Jun 20, 2026
cc5308c
fix fallback filter condition; use sha256 value from blossom server t…
Jun 20, 2026
97069f2
reorder key/values for the fallback hashmap
Jun 20, 2026
0ca146c
prevent previous blossom record overwrite with new upload
Jun 20, 2026
0adc5af
remove records with original url from the fallback list
Jun 20, 2026
9e17e51
minor performance optimization
Jun 20, 2026
94e7955
simplify debug message
Jun 20, 2026
e7585bd
Merge pull request #4 from YGGverse/nip-92-blossom
oooo-ps Jun 20, 2026
b52113f
implement blossom server aliases without remote upload (separated by …
Jun 20, 2026
fcf7ebf
partially fix logic; make semantic var names; update debug messages
Jun 20, 2026
4c8f4b1
partially fix logic; make semantic var names; update debug messages
Jun 20, 2026
69dec10
update debug format
Jun 21, 2026
f05859f
update debug format, reduce details output for base aliases
Jun 21, 2026
f5feb2c
assert url parsed equal; assert alias_base result; update debug messages
Jun 21, 2026
14819ce
implement `blossom_servers_append_extension` option; remove extension…
Jun 21, 2026
b3d76ba
implement `blossom_servers_append_to_content` config option
Jun 21, 2026
b0d9e9f
Merge pull request #5 from YGGverse/blossom-alias
oooo-ps Jun 21, 2026
23392a2
update option description
Jun 21, 2026
7480560
detect mime type for link from note metadata if exists, then use exte…
Jun 21, 2026
46f9644
minor code optimizations
Jun 21, 2026
ae7592e
resolve mimetype from imeta tags map, then extension; implement `blos…
Jun 21, 2026
ade1c62
fix settings key in condition
Jun 21, 2026
f3a2725
handle ending slash if exists
Jul 6, 2026
142a0fe
use colored label
Jul 6, 2026
d92da3b
update debug messages
Jul 7, 2026
b71f27f
prepare members to detailed reactions implementation
Jul 7, 2026
c3f7601
minor optimization
Jul 7, 2026
83c90e0
implement basic widget
Jul 7, 2026
47eeedb
make reactions list optional
Jul 7, 2026
e2d8cdb
resolve person details
Jul 7, 2026
6790c17
remove extra space
Jul 7, 2026
6e1e99e
implement compact view
Jul 7, 2026
a2c7f1b
Merge pull request #6 from YGGverse/reactions-info
oooo-ps Jul 7, 2026
55ac3ca
remove deprecated reactions widget implementation
Jul 7, 2026
a7da3fb
dirty fix to prevent long reactions list overflow; reorganize next wi…
Jul 7, 2026
ae86aa1
increase max width
Jul 7, 2026
fa26b16
hide event details on sending; change button color
Jul 7, 2026
fc42db1
reduce folding levels by optimizing by handle out of scope; implement…
Jul 8, 2026
31bf233
add undo send reverse counter
Jul 8, 2026
b8b874d
make look Keep Draft / Erase Draft different to Send; use namespace
Jul 8, 2026
9dc7d36
update secondary button style (dark mode only)
Jul 8, 2026
397f68d
implement proxy enable checkbox settings
Jul 12, 2026
c121d27
add separator
Jul 12, 2026
266046b
update search UI
Jul 29, 2026
91fc7d0
apply clippy
Jul 29, 2026
13e620a
fix paddings
Jul 29, 2026
a006c29
stop hashtag at white space
Jul 29, 2026
a0b0921
dereference values on compare
Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,606 changes: 1,419 additions & 1,187 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ bech32 = "0.11"
blurhash = { version = "0.2", features = [ "image" ] }
image = { version = "0.25", features = [ "png", "jpeg" ] }
lazy_static = "1.5"
nostr-types = { git = "https://github.com/mikedilger/nostr-types", rev = "e431110f5ad0a0692280ccf036e99e255837f41c", features = [ "speedy", "client", "nip46" ] }
#nostr-types = { git = "https://github.com/mikedilger/nostr-types", rev = "e431110f5ad0a0692280ccf036e99e255837f41c", features = [ "speedy", "client", "nip46" ] }
nostr-types = { path = "nostr-types", features = [ "speedy", "client", "nip46" ] } # I2P + IPv6 patch for linkify issues #108, #78
paste = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
3 changes: 3 additions & 0 deletions gossip-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ tracing-subscriber = { version = "0.3", features = [ "std", "env-filter", "regis
url = { workspace = true }
usvg = "0.35"
zeroize = { workspace = true }
indexmap = { version = "2.14" }
mime_guess = "2.0.5"
regex = "1.12.4"

[package.metadata.deb]
section = "web"
Expand Down
7 changes: 6 additions & 1 deletion gossip-bin/src/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub struct About {
pub authors: String,
//pub repository: String,
pub homepage: String,
pub contribution: String,
pub license: String,
pub storage_path: String,
}
Expand Down Expand Up @@ -36,9 +37,13 @@ impl About {
name: env!("CARGO_PKG_NAME").to_string(),
version,
description: env!("CARGO_PKG_DESCRIPTION").to_string(),
authors: env!("CARGO_PKG_AUTHORS").to_string(),
authors: format!(
"{}\nYGGverse developers (github.com/YGGverse)",
env!("CARGO_PKG_AUTHORS")
), // @TODO
//repository: env!("CARGO_PKG_REPOSITORY").to_string(),
homepage: env!("CARGO_PKG_HOMEPAGE").to_string(),
contribution: "https://github.com/YGGverse/gossip".to_string(), // @TODO
license: env!("CARGO_PKG_LICENSE").to_string(),
storage_path: data_dir,
}
Expand Down
34 changes: 15 additions & 19 deletions gossip-bin/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use gossip_lib::{Error, ErrorKind, PersonList, PersonListMetadata, PersonTable, Table, GLOBALS};
use indexmap::IndexSet;
use nostr_types::{
EncryptedPrivateKey, Event, EventKind, Filter, Id, NAddr, NostrBech32, NostrUrl, ParsedTag,
PreEvent, PrivateKey, PublicKey, RelayUrl, Tag, UncheckedUrl, Unixtime,
Expand Down Expand Up @@ -547,10 +548,10 @@ pub fn bech32_encode_naddr(cmd: Command, mut args: env::Args) -> Result<(), Erro
None => return cmd.usage("Missing d parameter".to_string()),
};

let mut urls: Vec<UncheckedUrl> = vec![];
let mut urls = IndexSet::new();

for s in args {
urls.push(UncheckedUrl::from_string(s));
urls.insert(UncheckedUrl::from_string(s));
}

let ea = NAddr {
Expand Down Expand Up @@ -698,18 +699,15 @@ pub async fn delete_spam_by_content(cmd: Command, mut args: env::Args) -> Result
// Find events among those with matching spammy content
let mut target_ids: Vec<Id> = Vec::new();
for event in events {
let mut matches = false;
if kind == EventKind::GiftWrap {
if let Ok(rumor) = GLOBALS.identity.unwrap_giftwrap(&event).await {
if rumor.content.contains(&substring) {
matches = true;
}
}
} else if event.content.contains(&substring) {
matches = true;
}

if matches {
if (kind == EventKind::GiftWrap
&& GLOBALS
.identity
.unwrap_giftwrap(&event)
.await?
.content
.contains(&substring))
|| event.content.contains(&substring)
{
target_ids.push(event.id);
}
}
Expand Down Expand Up @@ -746,10 +744,8 @@ pub async fn delete_spam_by_content(cmd: Command, mut args: env::Args) -> Result
let mut relays: HashSet<RelayUrl> = HashSet::new();
for id in &target_ids {
// Get seen on relays
if let Ok(seen_on) = GLOBALS.db().get_event_seen_on_relay(*id) {
for (relay, _when) in seen_on {
relays.insert(relay);
}
for relay in GLOBALS.db().get_event_seen_on_relay(*id)?.into_keys() {
relays.insert(relay);
}
}

Expand Down Expand Up @@ -1314,7 +1310,7 @@ pub fn reaction_stats(_cmd: Command, mut _args: env::Args) -> Result<(), Error>
.or_insert(1);
}
let mut reactions: Vec<(String, usize)> = reactions.drain().collect();
reactions.sort_by(|a, b| b.1.cmp(&a.1));
reactions.sort_by_key(|b| std::cmp::Reverse(b.1));
for (reaction, count) in reactions {
println!("{} {}", count, reaction);
}
Expand Down
16 changes: 8 additions & 8 deletions gossip-bin/src/ui/feed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ use gossip_lib::GLOBALS;
use nostr_types::Id;
use std::sync::atomic::Ordering;

mod note;
pub mod note;
pub use note::NoteRenderData;
pub(super) mod post;

const LONG_WAIT_TIME: f64 = 5.0; // seconds until the user has waited a long time for the feed to load

struct FeedNoteParams {
id: Id,
indent: usize,
as_reply_to: bool,
threaded: bool,
pub struct FeedNoteParams {
pub id: Id,
pub indent: usize,
pub as_reply_to: bool,
pub threaded: bool,
}

#[derive(Default)]
Expand Down Expand Up @@ -271,7 +271,7 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, ui: &mut Ui) {
ui.add_space(10.0);
ui.horizontal(|ui| {
add_left_space(ui);
ui.heading(format!("{}", &relay_url));
ui.heading(relay_url.to_string());
recompute_btn(app, ui);
});
ui.add_space(6.0);
Expand Down Expand Up @@ -523,7 +523,7 @@ fn render_load_more(app: &mut GossipUi, ui: &mut Ui) {
}

// draw some nice lines left and right of the button
let stroke = egui::Stroke::new(1.5, ui.visuals().extreme_bg_color);
let stroke = egui::Stroke::new(1.5_f32, ui.visuals().extreme_bg_color);
let width = (ui.available_width() - response.rect.width()) / 2.0 - 20.0;
let left_start = response.rect.left_center() - egui::vec2(10.0, 0.0);
let left_end = left_start - egui::vec2(width, 0.0);
Expand Down
4 changes: 2 additions & 2 deletions gossip-bin/src/ui/feed/note/content/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ fn add_media_menu(app: &mut GossipUi, ui: &mut Ui, url: Url, response: &Response
BTN_SIZE,
egui::Button::new(RichText::new("\u{1F310}").size(TXT_SIZE)),
)
.on_hover_text("View in Browser")
.on_hover_text(format!("Open in browser:\n\n{url}"))
.clicked()
{
let modifiers = ui.ctx().input(|i| i.modifiers);
Expand All @@ -412,7 +412,7 @@ fn add_media_menu(app: &mut GossipUi, ui: &mut Ui, url: Url, response: &Response
BTN_SIZE,
egui::Button::new(RichText::new("\u{1F4CB}").size(TXT_SIZE)),
)
.on_hover_text("Copy URL")
.on_hover_text(format!("Copy URL:\n\n{url}"))
.clicked()
{
ui.output_mut(|o| {
Expand Down
34 changes: 22 additions & 12 deletions gossip-bin/src/ui/feed/note/content/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use egui::{Button, Color32, Margin, Pos2, RichText, Stroke, Ui};
use gossip_lib::comms::ToOverlordMessage;
use gossip_lib::FeedKind;
use gossip_lib::GLOBALS;
use indexmap::IndexSet;
use nostr_types::{
ContentSegment, FileMetadata, Id, NAddr, NEvent, NostrBech32, NostrUrl, ParsedTag, PublicKey,
RelayUrl, Span,
Expand Down Expand Up @@ -47,7 +48,8 @@ pub(super) fn render_content(
} else {
Color32::BLACK
};
let button = Button::new("Show more ▼").stroke(Stroke::new(1.0, text_color));
let button =
Button::new("Show more ▼").stroke(Stroke::new(1.0_f32, text_color));
if ui.add(button).clicked() {
app.opened.insert(note.event.id);
}
Expand Down Expand Up @@ -182,7 +184,7 @@ pub(super) fn render_content(
if let Some(rurl) = recommended_relay_url {
let nevent = NEvent {
id,
relays: vec![rurl],
relays: IndexSet::from([rurl]),
kind: None,
author: None,
};
Expand Down Expand Up @@ -263,14 +265,22 @@ pub(super) fn render_hyperlink(
let privacy_issue = note.direct_message;

if let (Ok(url), Some(nurl)) = (url::Url::try_from(link), app.try_check_url(link)) {
if let Some(mimetype) = gossip_lib::media_url_mimetype(url.path()) {
if mimetype.starts_with("image/") {
media::show_image(app, ui, nurl, privacy_issue, note.volatile, file_metadata);
} else if mimetype.starts_with("video/") {
media::show_video(app, ui, nurl, privacy_issue, note.volatile, file_metadata);
match match file_metadata {
Some(ref fm) => fm.m.clone(),
None => mime_guess::from_path(url.path())
.first()
.map(|m| m.to_string()),
} {
Some(m) => {
if m.starts_with("image/") {
media::show_image(app, ui, nurl, privacy_issue, note.volatile, file_metadata)
} else if m.starts_with("video/") {
media::show_video(app, ui, nurl, privacy_issue, note.volatile, file_metadata)
} else {
crate::ui::widgets::break_anywhere_hyperlink_to(ui, app, link, link)
}
}
} else {
crate::ui::widgets::break_anywhere_hyperlink_to(ui, app, link, link);
None => crate::ui::widgets::break_anywhere_hyperlink_to(ui, app, link, link),
}
} else {
crate::ui::widgets::break_anywhere_hyperlink_to(ui, app, link, link);
Expand Down Expand Up @@ -304,7 +314,7 @@ pub(super) fn render_plain(
} else {
Color32::BLACK
};
let button = Button::new("Show more ▼").stroke(Stroke::new(1.0, text_color));
let button = Button::new("Show more ▼").stroke(Stroke::new(1.0_f32, text_color));
if ui.add(button).clicked() {
app.opened.insert(note.event.id);
}
Expand Down Expand Up @@ -345,7 +355,7 @@ pub fn render_relay_link(app: &mut GossipUi, ui: &mut Ui, relay_url: RelayUrl) {
pub fn render_note_id_link(app: &mut GossipUi, ui: &mut Ui, referenced_by_id: Id, link_to_id: Id) {
let nevent = NEvent {
id: link_to_id,
relays: vec![],
relays: IndexSet::new(),
kind: None,
author: None,
};
Expand Down Expand Up @@ -413,7 +423,7 @@ pub(super) fn render_hashtag(app: &mut GossipUi, ui: &mut Ui, s: &String) {
app.set_page(ui.ctx(), Page::SearchLocal);
let _ = GLOBALS
.to_overlord
.send(ToOverlordMessage::SearchLocally(app.search.clone()));
.send(ToOverlordMessage::SearchLocally(app.search.clone(), None));
}
}

Expand Down
Loading