Skip to content

Commit

Permalink
Some basic stuff and stop force signing linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
erskingardner committed Jan 5, 2025
1 parent 51ed413 commit 7df21c8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
SIGN: 1
SIGN_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
APPIMAGETOOL_SIGN_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
APPIMAGETOOL_FORCE_SIGN: 1
APPIMAGETOOL_FORCE_SIGN: 0

with:
args: ${{ matrix.args }}
3 changes: 3 additions & 0 deletions src-tauri/src/nostr_manager/fetch.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Fetch functions for NostrManager
//! This handles on-the-spot fetching of events from relays.
use crate::nostr_manager::{NostrManager, NostrManagerError, Result};
use nostr_sdk::prelude::*;

Expand Down
3 changes: 3 additions & 0 deletions src-tauri/src/nostr_manager/query.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Query functions for NostrManager
//! This handles fetching events from the database cache.
use crate::nostr_manager::{NostrManager, Result};
use nostr_sdk::prelude::*;

Expand Down
21 changes: 19 additions & 2 deletions src-tauri/src/nostr_manager/subscriptions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Subscription functions for NostrManager
//! This mostly handles subscribing and processing events as they come in while the user is active.
use crate::nostr_manager::{NostrManager, Result};
use nostr_sdk::prelude::*;
use tauri::Emitter;
Expand Down Expand Up @@ -162,11 +165,13 @@ impl NostrManager {
if let Ok(unwrapped) = extract_rumor(&self.client.signer().await?, &event).await {
match unwrapped.rumor.kind {
Kind::MlsWelcome => self.handle_invite(unwrapped.rumor)?,
Kind::PrivateDirectMessage => {
self.handle_private_direct_message(unwrapped.rumor)?
}
_ => {
// TODO: Handle other giftwrap kinds (NIP-17)
tracing::info!(
target: "whitenoise::nostr_client::subscriptions::handle_giftwrap",
"Received giftwrap of kind {:?}",
"Received unhandled giftwrap of kind {:?}",
unwrapped.rumor.kind
);
}
Expand All @@ -176,6 +181,7 @@ impl NostrManager {
}

fn handle_invite(&self, rumor: UnsignedEvent) -> Result<()> {
// TODO: We would like to be able to store these invites in the cache but since they're not signed we can't do that yet.
// TODO: Remove the identifying info from the log
tracing::info!(
target: "whitenoise::nostr_client::handle_notifications",
Expand All @@ -185,6 +191,17 @@ impl NostrManager {
Ok(())
}

fn handle_private_direct_message(&self, rumor: UnsignedEvent) -> Result<()> {
// TODO: We would like to be able to store these invites in the cache but since they're not signed we can't do that yet.
// TODO: Remove the identifying info from the log
tracing::info!(
target: "whitenoise::nostr_client::handle_notifications",
"Received private direct message: {:?}",
rumor
);
Ok(())
}

fn handle_mls_message(&self, event: Event, app_handle: tauri::AppHandle) -> Result<()> {
// TODO: Remove the identifying info from the log
tracing::info!(
Expand Down
4 changes: 4 additions & 0 deletions src-tauri/src/nostr_manager/sync.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Negentropy syncing functions for NostrManager
//! Negentropy is a fast/efficient way to fetch only the events that we don't have.
//! It's currently only suppoted by strfry relays so this is not used as extensively as it will be in the future.
#![allow(unused)]

use crate::nostr_manager::{NostrManager, NostrManagerError, Result};
Expand Down

0 comments on commit 7df21c8

Please sign in to comment.