Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0fb1948
WIP: Big Plans
erskingardner Aug 13, 2025
6f279e1
WIP: Update event processor methods
erskingardner Aug 13, 2025
d857fbe
More WIP refactoring
erskingardner Aug 13, 2025
260217c
WIP: Fix some linters
erskingardner Aug 13, 2025
0768806
Remove spawn_blocking
erskingardner Aug 13, 2025
ed373f3
WIP: FIxed all linter errors
erskingardner Aug 13, 2025
2447b54
chore(nostr_manager): remove unused import
jgmontoya Aug 13, 2025
77204a3
Fix warnings, move follows, update int-test
erskingardner Aug 14, 2025
0f4535e
WIP: Updates
erskingardner Aug 15, 2025
0bbae8a
create_new_account flow fixed
erskingardner Aug 15, 2025
1cdba9b
Fix login and clean up relay setup
erskingardner Aug 15, 2025
970c71a
Fix strange follows method
erskingardner Aug 15, 2025
87cf945
Refactor database methods to take only a database param, not whitenoise
erskingardner Aug 16, 2025
5ad3c69
remove triggers, background fetch using event handlers, fix update me…
erskingardner Aug 16, 2025
e1dd63a
feat(database/utils): add database utils with parse_timestamp method
jgmontoya Aug 16, 2025
fed44bf
fix(database/users): return persisted user on .find_by_pubkey
jgmontoya Aug 16, 2025
a276005
fix(database/follows): use find_or_create on Whitenoise#follow_users
jgmontoya Aug 16, 2025
3a45cf9
fix(integration_test): use pubkeys to verify final accounts state
jgmontoya Aug 16, 2025
e9423b0
refactor & fix Database#delete_all_data: now drops every table and re…
jgmontoya Aug 16, 2025
07b6e26
use find or create on relays to ensure they're properly persisted in …
jgmontoya Aug 16, 2025
1c6be74
refactor(accounts/core): split relay setup logic for new vs existing …
jgmontoya Aug 16, 2025
a7cf558
test(): fix doc-tests
jgmontoya Aug 16, 2025
ec3d3e4
integration test: replace .await? with .await.unwrap()
jgmontoya Aug 17, 2025
5b91398
fix(db_migrations/0007_drop_old_tables): ignore potential existing se…
jgmontoya Aug 17, 2025
4d6dbac
chore(nostr_manager/search): remove dead code
jgmontoya Aug 17, 2025
0fe6d0d
feat(accounts): publish metadata on #update_metadata
jgmontoya Aug 17, 2025
bebefbb
refactor(accounts/core): improve error handling and timestamp consist…
jgmontoya Aug 17, 2025
8708d49
refactor(accounts): replace unwrap() with proper error handling on gr…
jgmontoya Aug 17, 2025
cc00ed1
fix(accounts/welcomes): use find_or_create_by_url for relay lookup
jgmontoya Aug 17, 2025
3337aef
fix(database/accounts): stop throwing error when empty account table …
jgmontoya Aug 17, 2025
002c4da
fix(database/app_settings): improve error handling in .find_or_create…
jgmontoya Aug 17, 2025
68005b8
fix(database/relays): fix transaction safety and dangling references
jgmontoya Aug 17, 2025
608f859
fix(database/user_relays): better handle invalid RelayType values
jgmontoya Aug 17, 2025
24747e4
fix(database/user_relays): use single-connection SQLite pool for in-m…
jgmontoya Aug 17, 2025
e02728d
fix(database/users): improve error handling and remove_relay robustness
jgmontoya Aug 17, 2025
05cf570
fix(database/utils): improve timestamp parsing robustness and test re…
jgmontoya Aug 17, 2025
7a54e51
refactor(event_processor): replace unwrap() of Account::create_nostr_…
jgmontoya Aug 17, 2025
15eaa04
fix(database): preserve error provenance and validate user persistance
jgmontoya Aug 18, 2025
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
15 changes: 0 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
uuid = { version = "1.16.0", features = ["v4"] }
base64ct = "=1.7.3"
dotenvy = "0.15"
dashmap = "6.1.0"

[dev-dependencies]
mockito = "1.2"
Expand Down
25 changes: 25 additions & 0 deletions db_migrations/0007_drop_old_tables.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS app_settings (
id INTEGER PRIMARY KEY CHECK (id = 1), -- Only one row allowed with id=1
theme_mode TEXT NOT NULL DEFAULT 'system',
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

-- Insert default app settings row with system theme
INSERT OR IGNORE INTO app_settings (theme_mode) VALUES ('system');

-- Trigger to automatically update updated_at field on row updates
CREATE TRIGGER update_app_settings_updated_at
AFTER UPDATE ON app_settings
FOR EACH ROW
BEGIN
UPDATE app_settings SET updated_at = CURRENT_TIMESTAMP WHERE id = NEW.id;
END;


DROP TABLE IF EXISTS accounts;
DROP TABLE IF EXISTS contacts;

ALTER TABLE accounts_new RENAME TO accounts;

ALTER TABLE accounts DROP COLUMN settings;
4 changes: 4 additions & 0 deletions db_migrations/0008_add_account_follows_unique_constraint.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Add unique constraint to account_follows table to prevent duplicate follows
-- This constraint ensures that an account can only follow a user once
CREATE UNIQUE INDEX IF NOT EXISTS idx_account_follows_unique
ON account_follows(account_id, user_id);
11 changes: 11 additions & 0 deletions db_migrations/0009_fix_timestamp_triggers.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Remove all automatic updated_at triggers to prevent recursion
-- The application code will handle updating timestamps manually

-- Drop all existing updated_at triggers
DROP TRIGGER IF EXISTS update_users_updated_at;
DROP TRIGGER IF EXISTS update_accounts_new_updated_at;
DROP TRIGGER IF EXISTS update_accounts_updated_at;
DROP TRIGGER IF EXISTS update_account_follows_updated_at;
DROP TRIGGER IF EXISTS update_relays_updated_at;
DROP TRIGGER IF EXISTS update_user_relays_updated_at;
DROP TRIGGER IF EXISTS update_app_settings_updated_at;
78 changes: 0 additions & 78 deletions examples/README.md

This file was deleted.

Loading
Loading