make the nip4e optional
This commit is contained in:
@@ -620,13 +620,19 @@ impl ChatPanel {
|
||||
})
|
||||
.is_err()
|
||||
{
|
||||
window.push_notification(
|
||||
Notification::error("Failed to change subject").autohide(false),
|
||||
cx,
|
||||
);
|
||||
window.push_notification(Notification::error("Failed to change subject"), cx);
|
||||
}
|
||||
}
|
||||
Command::ChangeSigner(kind) => {
|
||||
let is_nip4e_enabled = AppSettings::get_encryption_key(cx);
|
||||
|
||||
if !is_nip4e_enabled
|
||||
&& (*kind == SignerKind::Encryption || *kind == SignerKind::Auto)
|
||||
{
|
||||
window.push_notification("Decoupling Encryption Key is not enabled", cx);
|
||||
return;
|
||||
}
|
||||
|
||||
if self
|
||||
.room
|
||||
.update(cx, |this, cx| {
|
||||
@@ -634,10 +640,7 @@ impl ChatPanel {
|
||||
})
|
||||
.is_err()
|
||||
{
|
||||
window.push_notification(
|
||||
Notification::error("Failed to change signer").autohide(false),
|
||||
cx,
|
||||
);
|
||||
window.push_notification(Notification::error("Failed to change signer"), cx);
|
||||
}
|
||||
}
|
||||
Command::ToggleBackup => {
|
||||
@@ -648,10 +651,7 @@ impl ChatPanel {
|
||||
})
|
||||
.is_err()
|
||||
{
|
||||
window.push_notification(
|
||||
Notification::error("Failed to toggle backup").autohide(false),
|
||||
cx,
|
||||
);
|
||||
window.push_notification(Notification::error("Failed to toggle backup"), cx);
|
||||
}
|
||||
}
|
||||
Command::Copy(public_key) => {
|
||||
|
||||
Reference in New Issue
Block a user