mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 14:04:21 +01:00
feat: show alert when trying to post nsec
This commit is contained in:
@@ -191,6 +191,11 @@ const NotePostForm: Component<NotePostFormProps> = (props) => {
|
|||||||
if (text().length === 0) return;
|
if (text().length === 0) return;
|
||||||
if (publishTextNoteMutation.isLoading) return;
|
if (publishTextNoteMutation.isLoading) return;
|
||||||
|
|
||||||
|
if (/nsec1[0-9a-zA-Z]+/.test(text())) {
|
||||||
|
window.alert('投稿に秘密鍵(nsec)を含めることはできません。');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const pubkey = getPubkey();
|
const pubkey = getPubkey();
|
||||||
if (pubkey == null) {
|
if (pubkey == null) {
|
||||||
console.error('pubkey is not available');
|
console.error('pubkey is not available');
|
||||||
|
|||||||
Reference in New Issue
Block a user