feat: revamp the chat panel ui #7
113
Cargo.lock
generated
113
Cargo.lock
generated
@@ -298,9 +298,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-executor"
|
name = "async-executor"
|
||||||
version = "1.13.3"
|
version = "1.14.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8"
|
checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-task",
|
"async-task",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
@@ -1072,9 +1072,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.58"
|
version = "4.5.59"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806"
|
checksum = "c5caf74d17c3aec5495110c34cc3f78644bfa89af6c8993ed4de2790e49b6499"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
@@ -1082,9 +1082,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.58"
|
version = "4.5.59"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2"
|
checksum = "370daa45065b80218950227371916a1633217ae42b2715b2287b606dcd618e24"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
@@ -1193,7 +1193,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collections"
|
name = "collections"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
@@ -1638,7 +1638,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_refineable"
|
name = "derive_refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -2184,7 +2184,7 @@ checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"fontconfig-parser",
|
"fontconfig-parser",
|
||||||
"log",
|
"log",
|
||||||
"memmap2 0.9.9",
|
"memmap2 0.9.10",
|
||||||
"slotmap",
|
"slotmap",
|
||||||
"tinyvec",
|
"tinyvec",
|
||||||
"ttf-parser",
|
"ttf-parser",
|
||||||
@@ -2289,9 +2289,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures"
|
name = "futures"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
|
checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
@@ -2304,9 +2304,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-channel"
|
name = "futures-channel"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
|
checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-sink",
|
"futures-sink",
|
||||||
@@ -2314,15 +2314,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-core"
|
name = "futures-core"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
|
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-executor"
|
name = "futures-executor"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
|
checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-task",
|
"futures-task",
|
||||||
@@ -2331,9 +2331,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-io"
|
name = "futures-io"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
|
checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-lite"
|
name = "futures-lite"
|
||||||
@@ -2365,9 +2365,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-macro"
|
name = "futures-macro"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
|
checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -2376,21 +2376,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-sink"
|
name = "futures-sink"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
|
checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-task"
|
name = "futures-task"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
|
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-util"
|
name = "futures-util"
|
||||||
version = "0.3.31"
|
version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
|
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
@@ -2400,7 +2400,6 @@ dependencies = [
|
|||||||
"futures-task",
|
"futures-task",
|
||||||
"memchr",
|
"memchr",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"pin-utils",
|
|
||||||
"slab",
|
"slab",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2589,7 +2588,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui"
|
name = "gpui"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
@@ -2689,7 +2688,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui_macros"
|
name = "gpui_macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -2700,7 +2699,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui_tokio"
|
name = "gpui_tokio"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"gpui",
|
"gpui",
|
||||||
@@ -2929,7 +2928,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client"
|
name = "http_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-compression",
|
"async-compression",
|
||||||
@@ -2954,7 +2953,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client_tls"
|
name = "http_client_tls"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustls",
|
"rustls",
|
||||||
"rustls-platform-verifier",
|
"rustls-platform-verifier",
|
||||||
@@ -3192,7 +3191,7 @@ dependencies = [
|
|||||||
"image-webp",
|
"image-webp",
|
||||||
"moxcms",
|
"moxcms",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"png 0.18.0",
|
"png 0.18.1",
|
||||||
"qoi",
|
"qoi",
|
||||||
"ravif",
|
"ravif",
|
||||||
"rayon",
|
"rayon",
|
||||||
@@ -3735,7 +3734,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "media"
|
name = "media"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bindgen",
|
"bindgen",
|
||||||
@@ -3764,9 +3763,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memmap2"
|
name = "memmap2"
|
||||||
version = "0.9.9"
|
version = "0.9.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490"
|
checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
@@ -4552,7 +4551,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "perf"
|
name = "perf"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"collections",
|
"collections",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -4701,9 +4700,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "png"
|
name = "png"
|
||||||
version = "0.18.0"
|
version = "0.18.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0"
|
checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.0",
|
"bitflags 2.11.0",
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
@@ -5228,7 +5227,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "refineable"
|
name = "refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_refineable",
|
"derive_refineable",
|
||||||
]
|
]
|
||||||
@@ -5333,7 +5332,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest_client"
|
name = "reqwest_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -5388,7 +5387,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "rope"
|
name = "rope"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"log",
|
"log",
|
||||||
@@ -5650,7 +5649,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "scheduler"
|
name = "scheduler"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-task",
|
"async-task",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
@@ -6231,7 +6230,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sum_tree"
|
name = "sum_tree"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"log",
|
"log",
|
||||||
@@ -6347,9 +6346,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.115"
|
version = "2.0.116"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
|
checksum = "3df424c70518695237746f84cede799c9c58fcb37450d7b23716568cc8bc69cb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -6827,9 +6826,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_parser"
|
name = "toml_parser"
|
||||||
version = "1.0.8+spec-1.1.0"
|
version = "1.0.9+spec-1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0742ff5ff03ea7e67c8ae6c93cac239e0d9784833362da3f9a9c1da8dfefcbdc"
|
checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
@@ -7055,9 +7054,9 @@ checksum = "ce61d488bcdc9bc8b5d1772c404828b17fc481c0a582b5581e95fb233aef503e"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.23"
|
version = "1.0.24"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-linebreak"
|
name = "unicode-linebreak"
|
||||||
@@ -7187,7 +7186,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "util"
|
name = "util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-fs",
|
"async-fs",
|
||||||
@@ -7225,7 +7224,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "util_macros"
|
name = "util_macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"perf",
|
"perf",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -8694,7 +8693,7 @@ checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
"libc",
|
"libc",
|
||||||
"memmap2 0.9.9",
|
"memmap2 0.9.10",
|
||||||
"xkeysym",
|
"xkeysym",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -9033,7 +9032,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "zlog"
|
name = "zlog"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -9050,7 +9049,7 @@ checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ztracing"
|
name = "ztracing"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
@@ -9061,7 +9060,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ztracing_macro"
|
name = "ztracing_macro"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#e4f2492099cf76bc1eb1eda56eaf56ecf6fadbf8"
|
source = "git+https://github.com/zed-industries/zed#deb26f8c5f89341206a1c5da7c79f6c3654f5fc5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zune-core"
|
name = "zune-core"
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ impl ChatRegistry {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log::info!("Received gift-wrap event: {event:?}");
|
||||||
|
|
||||||
// Extract the rumor from the gift wrap event
|
// Extract the rumor from the gift wrap event
|
||||||
match Self::extract_rumor(&client, &device_signer, event.as_ref()).await {
|
match Self::extract_rumor(&client, &device_signer, event.as_ref()).await {
|
||||||
Ok(rumor) => match rumor.created_at >= initialized_at {
|
Ok(rumor) => match rumor.created_at >= initialized_at {
|
||||||
|
|||||||
@@ -524,9 +524,7 @@ impl Room {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Create and send gift-wrapped event
|
// Create and send gift-wrapped event
|
||||||
match EventBuilder::gift_wrap(&signer_to_use, &receiver, rumor.clone(), vec![])
|
match EventBuilder::gift_wrap(&signer_to_use, &receiver, rumor.clone(), []).await {
|
||||||
.await
|
|
||||||
{
|
|
||||||
Ok(event) => {
|
Ok(event) => {
|
||||||
match client
|
match client
|
||||||
.send_event(&event)
|
.send_event(&event)
|
||||||
|
|||||||
@@ -84,20 +84,20 @@ fn main() {
|
|||||||
// Initialize the nostr client
|
// Initialize the nostr client
|
||||||
state::init(cx);
|
state::init(cx);
|
||||||
|
|
||||||
|
// Initialize relay auth registry
|
||||||
|
relay_auth::init(window, cx);
|
||||||
|
|
||||||
|
// Initialize person registry
|
||||||
|
person::init(cx);
|
||||||
|
|
||||||
// Initialize device signer
|
// Initialize device signer
|
||||||
//
|
//
|
||||||
// NIP-4e: https://github.com/nostr-protocol/nips/blob/per-device-keys/4e.md
|
// NIP-4e: https://github.com/nostr-protocol/nips/blob/per-device-keys/4e.md
|
||||||
device::init(window, cx);
|
device::init(window, cx);
|
||||||
|
|
||||||
// Initialize relay auth registry
|
|
||||||
relay_auth::init(window, cx);
|
|
||||||
|
|
||||||
// Initialize app registry
|
// Initialize app registry
|
||||||
chat::init(cx);
|
chat::init(cx);
|
||||||
|
|
||||||
// Initialize person registry
|
|
||||||
person::init(cx);
|
|
||||||
|
|
||||||
// Initialize auto update
|
// Initialize auto update
|
||||||
auto_update::init(cx);
|
auto_update::init(cx);
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
use std::collections::HashSet;
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use anyhow::{anyhow, Context as AnyhowContext, Error};
|
use anyhow::{anyhow, Context as AnyhowContext, Error};
|
||||||
use gpui::{App, AppContext, Context, Entity, Global, Subscription, Task, Window};
|
use gpui::{App, AppContext, Context, Entity, Global, Subscription, Task, Window};
|
||||||
use nostr_sdk::prelude::*;
|
use nostr_sdk::prelude::*;
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use state::{app_name, NostrRegistry, RelayState, TIMEOUT};
|
use state::{app_name, NostrRegistry, RelayState, DEVICE_GIFTWRAP, TIMEOUT};
|
||||||
|
|
||||||
mod device;
|
mod device;
|
||||||
|
|
||||||
@@ -174,14 +174,48 @@ impl DeviceRegistry {
|
|||||||
self.tasks.push(cx.spawn(async move |this, cx| {
|
self.tasks.push(cx.spawn(async move |this, cx| {
|
||||||
signer.set_encryption_signer(new).await;
|
signer.set_encryption_signer(new).await;
|
||||||
|
|
||||||
|
// Update state
|
||||||
this.update(cx, |this, cx| {
|
this.update(cx, |this, cx| {
|
||||||
this.set_state(DeviceState::Set, cx);
|
this.set_state(DeviceState::Set, cx);
|
||||||
|
this.get_messages(cx);
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Continuously get gift wrap events for the current encryption keys
|
||||||
|
fn get_messages(&mut self, cx: &mut Context<Self>) {
|
||||||
|
let nostr = NostrRegistry::global(cx);
|
||||||
|
let client = nostr.read(cx).client();
|
||||||
|
let signer = nostr.read(cx).signer();
|
||||||
|
let messaging_relays = nostr.read(cx).messaging_relays(cx);
|
||||||
|
|
||||||
|
let task: Task<Result<(), Error>> = cx.background_spawn(async move {
|
||||||
|
let encryption_signer = signer
|
||||||
|
.get_encryption_signer()
|
||||||
|
.await
|
||||||
|
.context("Signer not found")?;
|
||||||
|
|
||||||
|
let public_key = encryption_signer.get_public_key().await?;
|
||||||
|
let urls = messaging_relays.await;
|
||||||
|
|
||||||
|
let filter = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
|
||||||
|
let id = SubscriptionId::new(DEVICE_GIFTWRAP);
|
||||||
|
|
||||||
|
// Construct target for subscription
|
||||||
|
let target: HashMap<&RelayUrl, Filter> =
|
||||||
|
urls.iter().map(|relay| (relay, filter.clone())).collect();
|
||||||
|
|
||||||
|
client.subscribe(target).with_id(id).await?;
|
||||||
|
log::info!("Subscribed to encryption gift-wrap messages");
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
});
|
||||||
|
|
||||||
|
task.detach();
|
||||||
|
}
|
||||||
|
|
||||||
/// Set the device state
|
/// Set the device state
|
||||||
fn set_state(&mut self, state: DeviceState, cx: &mut Context<Self>) {
|
fn set_state(&mut self, state: DeviceState, cx: &mut Context<Self>) {
|
||||||
self.state = state;
|
self.state = state;
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ impl PersonRegistry {
|
|||||||
/// Handle nostr notifications
|
/// Handle nostr notifications
|
||||||
async fn handle_notifications(client: &Client, tx: &flume::Sender<Dispatch>) {
|
async fn handle_notifications(client: &Client, tx: &flume::Sender<Dispatch>) {
|
||||||
let mut notifications = client.notifications();
|
let mut notifications = client.notifications();
|
||||||
|
let mut processed: HashSet<EventId> = HashSet::new();
|
||||||
|
|
||||||
while let Some(notification) = notifications.next().await {
|
while let Some(notification) = notifications.next().await {
|
||||||
let ClientNotification::Message { message, .. } = notification else {
|
let ClientNotification::Message { message, .. } = notification else {
|
||||||
@@ -152,6 +153,11 @@ impl PersonRegistry {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if let RelayMessage::Event { event, .. } = message {
|
if let RelayMessage::Event { event, .. } = message {
|
||||||
|
// Skip if the event has already been processed
|
||||||
|
if !processed.insert(event.id) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
match event.kind {
|
match event.kind {
|
||||||
Kind::Metadata => {
|
Kind::Metadata => {
|
||||||
let metadata = Metadata::from_json(&event.content).unwrap_or_default();
|
let metadata = Metadata::from_json(&event.content).unwrap_or_default();
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ impl RelayAuth {
|
|||||||
// Handle authentication messages
|
// Handle authentication messages
|
||||||
if let Some(MachineReadablePrefix::AuthRequired) = msg {
|
if let Some(MachineReadablePrefix::AuthRequired) = msg {
|
||||||
let signal = Signal::Pending((event_id, relay_url));
|
let signal = Signal::Pending((event_id, relay_url));
|
||||||
|
|
||||||
tx.send_async(signal).await.ok();
|
tx.send_async(signal).await.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -242,18 +241,25 @@ impl RelayAuth {
|
|||||||
.send_msg(ClientMessage::Auth(Cow::Borrowed(&event)))
|
.send_msg(ClientMessage::Auth(Cow::Borrowed(&event)))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
log::info!("Sending AUTH event");
|
||||||
|
|
||||||
while let Some(notification) = notifications.next().await {
|
while let Some(notification) = notifications.next().await {
|
||||||
match notification {
|
match notification {
|
||||||
RelayNotification::Message {
|
RelayNotification::Message {
|
||||||
message: RelayMessage::Ok { event_id, .. },
|
message: RelayMessage::Ok { event_id, .. },
|
||||||
} => {
|
} => {
|
||||||
if id == event_id {
|
if id != event_id {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Get all subscriptions
|
// Get all subscriptions
|
||||||
let subscriptions = relay.subscriptions().await;
|
let subscriptions = relay.subscriptions().await;
|
||||||
|
|
||||||
// Re-subscribe to previous subscriptions
|
// Re-subscribe to previous subscriptions
|
||||||
for (id, filters) in subscriptions.into_iter() {
|
for (id, filters) in subscriptions.into_iter() {
|
||||||
relay.subscribe(filters).with_id(id).await?;
|
if !filters.is_empty() {
|
||||||
|
relay.send_msg(ClientMessage::req(id, filters)).await?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-send pending events
|
// Re-send pending events
|
||||||
@@ -265,7 +271,6 @@ impl RelayAuth {
|
|||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
RelayNotification::AuthenticationFailed => break,
|
RelayNotification::AuthenticationFailed => break,
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,76 +0,0 @@
|
|||||||
use gpui::SharedString;
|
|
||||||
use nostr_sdk::prelude::*;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
|
|
||||||
pub enum DeviceState {
|
|
||||||
#[default]
|
|
||||||
Idle,
|
|
||||||
Requesting,
|
|
||||||
Set,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl DeviceState {
|
|
||||||
pub fn idle(&self) -> bool {
|
|
||||||
matches!(self, DeviceState::Idle)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn requesting(&self) -> bool {
|
|
||||||
matches!(self, DeviceState::Requesting)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn set(&self) -> bool {
|
|
||||||
matches!(self, DeviceState::Set)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Announcement
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
||||||
pub struct Announcement {
|
|
||||||
/// The public key of the device that created this announcement.
|
|
||||||
public_key: PublicKey,
|
|
||||||
|
|
||||||
/// The name of the device that created this announcement.
|
|
||||||
client_name: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<&Event> for Announcement {
|
|
||||||
fn from(val: &Event) -> Self {
|
|
||||||
let public_key = val
|
|
||||||
.tags
|
|
||||||
.iter()
|
|
||||||
.find(|tag| tag.kind().as_str() == "n")
|
|
||||||
.and_then(|tag| tag.content())
|
|
||||||
.and_then(|c| PublicKey::parse(c).ok())
|
|
||||||
.unwrap_or(val.pubkey);
|
|
||||||
|
|
||||||
let client_name = val
|
|
||||||
.tags
|
|
||||||
.find(TagKind::Client)
|
|
||||||
.and_then(|tag| tag.content())
|
|
||||||
.map(|c| c.to_string());
|
|
||||||
|
|
||||||
Self::new(public_key, client_name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Announcement {
|
|
||||||
pub fn new(public_key: PublicKey, client_name: Option<String>) -> Self {
|
|
||||||
Self {
|
|
||||||
public_key,
|
|
||||||
client_name,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the public key of the device that created this announcement.
|
|
||||||
pub fn public_key(&self) -> PublicKey {
|
|
||||||
self.public_key
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the client name of the device that created this announcement.
|
|
||||||
pub fn client_name(&self) -> SharedString {
|
|
||||||
self.client_name
|
|
||||||
.as_ref()
|
|
||||||
.map(SharedString::from)
|
|
||||||
.unwrap_or(SharedString::from("Unknown"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -276,8 +276,7 @@ impl NostrRegistry {
|
|||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
for relay in relays.iter() {
|
for relay in relays.iter() {
|
||||||
client.add_relay(relay).await.ok();
|
client.add_relay(relay).and_connect().await.ok();
|
||||||
client.connect_relay(relay).await.ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relays
|
relays
|
||||||
@@ -324,6 +323,7 @@ impl NostrRegistry {
|
|||||||
// Update states
|
// Update states
|
||||||
this.update(cx, |this, cx| {
|
this.update(cx, |this, cx| {
|
||||||
this.reset_relay_states(cx);
|
this.reset_relay_states(cx);
|
||||||
|
this.get_relay_list(cx);
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -358,6 +358,7 @@ impl NostrRegistry {
|
|||||||
|
|
||||||
let mut stream = client
|
let mut stream = client
|
||||||
.stream_events(target)
|
.stream_events(target)
|
||||||
|
.policy(ReqExitPolicy::WaitForEvents(1))
|
||||||
.timeout(Duration::from_secs(TIMEOUT))
|
.timeout(Duration::from_secs(TIMEOUT))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
@@ -435,6 +436,7 @@ impl NostrRegistry {
|
|||||||
// Stream events from the write relays
|
// Stream events from the write relays
|
||||||
let mut stream = client
|
let mut stream = client
|
||||||
.stream_events(filter)
|
.stream_events(filter)
|
||||||
|
.policy(ReqExitPolicy::WaitForEvents(1))
|
||||||
.timeout(Duration::from_secs(TIMEOUT))
|
.timeout(Duration::from_secs(TIMEOUT))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
@@ -492,37 +494,20 @@ impl NostrRegistry {
|
|||||||
let urls = messaging_relays.await;
|
let urls = messaging_relays.await;
|
||||||
let public_key = signer.get_public_key().await?;
|
let public_key = signer.get_public_key().await?;
|
||||||
|
|
||||||
// Get messages with dekey
|
|
||||||
if let Some(signer) = signer.get_encryption_signer().await.as_ref() {
|
|
||||||
let device_pkey = signer.get_public_key().await?;
|
|
||||||
let filter = Filter::new().kind(Kind::GiftWrap).pubkey(device_pkey);
|
|
||||||
let id = SubscriptionId::new(DEVICE_GIFTWRAP);
|
|
||||||
|
|
||||||
// Construct target for subscription
|
|
||||||
let target = urls
|
|
||||||
.iter()
|
|
||||||
.map(|relay| (relay, vec![filter.clone()]))
|
|
||||||
.collect::<HashMap<_, _>>();
|
|
||||||
|
|
||||||
client.subscribe(target).with_id(id).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get messages with user key
|
|
||||||
let filter = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
|
let filter = Filter::new().kind(Kind::GiftWrap).pubkey(public_key);
|
||||||
let id = SubscriptionId::new(USER_GIFTWRAP);
|
let id = SubscriptionId::new(USER_GIFTWRAP);
|
||||||
|
|
||||||
// Construct target for subscription
|
// Construct target for subscription
|
||||||
let target = urls
|
let target: HashMap<&RelayUrl, Filter> =
|
||||||
.iter()
|
urls.iter().map(|relay| (relay, filter.clone())).collect();
|
||||||
.map(|relay| (relay, vec![filter.clone()]))
|
|
||||||
.collect::<HashMap<_, _>>();
|
|
||||||
|
|
||||||
client.subscribe(target).with_id(id).await?;
|
client.subscribe(target).with_id(id).await?;
|
||||||
|
log::info!("Subscribed to user gift-wrap messages");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
|
|
||||||
task.detach_and_log_err(cx);
|
task.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get profile and contact list for current user
|
/// Get profile and contact list for current user
|
||||||
@@ -595,6 +580,7 @@ impl NostrRegistry {
|
|||||||
fn set_default_signer(&mut self, cx: &mut Context<Self>) {
|
fn set_default_signer(&mut self, cx: &mut Context<Self>) {
|
||||||
let client = self.client();
|
let client = self.client();
|
||||||
let keys = Keys::generate();
|
let keys = Keys::generate();
|
||||||
|
let async_keys = keys.clone();
|
||||||
|
|
||||||
// Create a write credential task
|
// Create a write credential task
|
||||||
let write_credential = cx.write_credentials(
|
let write_credential = cx.write_credentials(
|
||||||
@@ -603,21 +589,18 @@ impl NostrRegistry {
|
|||||||
&keys.secret_key().to_secret_bytes(),
|
&keys.secret_key().to_secret_bytes(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update the signer
|
|
||||||
self.set_signer(keys, false, cx);
|
|
||||||
|
|
||||||
// Set the creating signer status
|
// Set the creating signer status
|
||||||
self.set_creating_signer(true, cx);
|
self.set_creating_signer(true, cx);
|
||||||
|
|
||||||
// Run async tasks in background
|
// Run async tasks in background
|
||||||
let task: Task<Result<(), Error>> = cx.background_spawn(async move {
|
let task: Task<Result<(), Error>> = cx.background_spawn(async move {
|
||||||
let signer = client.signer().context("Signer not found")?;
|
let signer = async_keys.into_nostr_signer();
|
||||||
|
|
||||||
// Get default relay list
|
// Get default relay list
|
||||||
let relay_list = default_relay_list();
|
let relay_list = default_relay_list();
|
||||||
|
|
||||||
// Publish relay list event
|
// Publish relay list event
|
||||||
let event = EventBuilder::relay_list(relay_list).sign(signer).await?;
|
let event = EventBuilder::relay_list(relay_list).sign(&signer).await?;
|
||||||
client
|
client
|
||||||
.send_event(&event)
|
.send_event(&event)
|
||||||
.broadcast()
|
.broadcast()
|
||||||
@@ -630,7 +613,7 @@ impl NostrRegistry {
|
|||||||
let metadata = Metadata::new().display_name(&name).picture(avatar);
|
let metadata = Metadata::new().display_name(&name).picture(avatar);
|
||||||
|
|
||||||
// Publish metadata event
|
// Publish metadata event
|
||||||
let event = EventBuilder::metadata(&metadata).sign(signer).await?;
|
let event = EventBuilder::metadata(&metadata).sign(&signer).await?;
|
||||||
client
|
client
|
||||||
.send_event(&event)
|
.send_event(&event)
|
||||||
.broadcast()
|
.broadcast()
|
||||||
@@ -642,7 +625,7 @@ impl NostrRegistry {
|
|||||||
let contacts = vec![Contact::new(PublicKey::parse(COOP_PUBKEY).unwrap())];
|
let contacts = vec![Contact::new(PublicKey::parse(COOP_PUBKEY).unwrap())];
|
||||||
|
|
||||||
// Publish contact list event
|
// Publish contact list event
|
||||||
let event = EventBuilder::contact_list(contacts).sign(signer).await?;
|
let event = EventBuilder::contact_list(contacts).sign(&signer).await?;
|
||||||
client
|
client
|
||||||
.send_event(&event)
|
.send_event(&event)
|
||||||
.broadcast()
|
.broadcast()
|
||||||
@@ -654,7 +637,7 @@ impl NostrRegistry {
|
|||||||
let relays = default_messaging_relays();
|
let relays = default_messaging_relays();
|
||||||
|
|
||||||
// Publish messaging relay list event
|
// Publish messaging relay list event
|
||||||
let event = EventBuilder::nip17_relay_list(relays).sign(signer).await?;
|
let event = EventBuilder::nip17_relay_list(relays).sign(&signer).await?;
|
||||||
client
|
client
|
||||||
.send_event(&event)
|
.send_event(&event)
|
||||||
.to_nip65()
|
.to_nip65()
|
||||||
@@ -674,7 +657,7 @@ impl NostrRegistry {
|
|||||||
|
|
||||||
this.update(cx, |this, cx| {
|
this.update(cx, |this, cx| {
|
||||||
this.set_creating_signer(false, cx);
|
this.set_creating_signer(false, cx);
|
||||||
this.get_relay_list(cx);
|
this.set_signer(keys, false, cx);
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -693,7 +676,6 @@ impl NostrRegistry {
|
|||||||
|
|
||||||
this.update(cx, |this, cx| {
|
this.update(cx, |this, cx| {
|
||||||
this.set_signer(keys, false, cx);
|
this.set_signer(keys, false, cx);
|
||||||
this.get_relay_list(cx);
|
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
@@ -736,7 +718,6 @@ impl NostrRegistry {
|
|||||||
Ok(signer) => {
|
Ok(signer) => {
|
||||||
this.update(cx, |this, cx| {
|
this.update(cx, |this, cx| {
|
||||||
this.set_signer(signer, true, cx);
|
this.set_signer(signer, true, cx);
|
||||||
this.get_relay_list(cx);
|
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user