mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-18 10:04:20 +01:00
android content query add reject colum
This commit is contained in:
@@ -254,7 +254,7 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
}
|
||||
|
||||
checkPermission(context, AppType.WEB, code, AuthType.GET_PUBLIC_KEY,
|
||||
(app) {
|
||||
(app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) {
|
||||
print("confirm get pubkey");
|
||||
@@ -283,7 +283,7 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
var eventKind = eventObj["kind"];
|
||||
if (eventKind is int) {
|
||||
checkPermission(context, AppType.WEB, code, AuthType.SIGN_EVENT,
|
||||
eventKind: eventKind, authDetail: content, (app) {
|
||||
eventKind: eventKind, authDetail: content, (app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) async {
|
||||
var tags = eventObj["tags"];
|
||||
@@ -321,7 +321,8 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
return;
|
||||
}
|
||||
|
||||
checkPermission(context, AppType.WEB, code, AuthType.GET_RELAYS, (app) {
|
||||
checkPermission(context, AppType.WEB, code, AuthType.GET_RELAYS,
|
||||
(app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) {
|
||||
// TODO handle getRelays
|
||||
@@ -359,7 +360,7 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
}
|
||||
|
||||
checkPermission(context, AppType.WEB, code, AuthType.NIP04_ENCRYPT,
|
||||
(app) {
|
||||
(app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) async {
|
||||
var resultStr = await signer.encrypt(pubkey, plaintext);
|
||||
@@ -391,7 +392,7 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
}
|
||||
|
||||
checkPermission(context, AppType.WEB, code, AuthType.NIP04_DECRYPT,
|
||||
(app) {
|
||||
(app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) async {
|
||||
var app = appProvider.getApp(AppType.WEB, code);
|
||||
@@ -426,7 +427,7 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
}
|
||||
|
||||
checkPermission(context, AppType.WEB, code, AuthType.NIP44_ENCRYPT,
|
||||
(app) {
|
||||
(app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) async {
|
||||
var resultStr = await signer.nip44Encrypt(pubkey, plaintext);
|
||||
@@ -458,7 +459,7 @@ class _WebViewComponent extends State<WebViewComponent>
|
||||
}
|
||||
|
||||
checkPermission(context, AppType.WEB, code, AuthType.NIP44_DECRYPT,
|
||||
(app) {
|
||||
(app, rejectType) {
|
||||
nip07Reject(resultId, "Forbid");
|
||||
}, (app, signer) async {
|
||||
var resultStr = await signer.nip44Decrypt(pubkey, ciphertext);
|
||||
|
||||
Reference in New Issue
Block a user