diff options
| author | greenart7c3 <115044884+greenart7c3@users.noreply.github.com> | 2025-02-07 16:21:19 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 14:21:19 -0500 |
| commit | 57c84cc87a75e8598004530556fc5988dfc26c49 (patch) | |
| tree | 540d00e830ee55c6477fd8557c624f8c23e1468b /55.md | |
| parent | 546b897fd763ef54bafdb453f005b6f81f1fbab8 (diff) | |
[NIP-55] - Add the rejected permission check in the code samples (#1755)
Diffstat (limited to '55.md')
| -rw-r--r-- | 55.md | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -339,6 +339,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 339 | ```kotlin | 339 | ```kotlin |
| 340 | if (result == null) return | 340 | if (result == null) return |
| 341 | 341 | ||
| 342 | if (it.getColumnIndex("rejected") > -1) return | ||
| 343 | |||
| 342 | if (result.moveToFirst()) { | 344 | if (result.moveToFirst()) { |
| 343 | val index = it.getColumnIndex("result") | 345 | val index = it.getColumnIndex("result") |
| 344 | if (index < 0) return | 346 | if (index < 0) return |
| @@ -364,6 +366,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 364 | ```kotlin | 366 | ```kotlin |
| 365 | if (result == null) return | 367 | if (result == null) return |
| 366 | 368 | ||
| 369 | if (it.getColumnIndex("rejected") > -1) return | ||
| 370 | |||
| 367 | if (result.moveToFirst()) { | 371 | if (result.moveToFirst()) { |
| 368 | val index = it.getColumnIndex("result") | 372 | val index = it.getColumnIndex("result") |
| 369 | val indexJson = it.getColumnIndex("event") | 373 | val indexJson = it.getColumnIndex("event") |
| @@ -390,6 +394,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 390 | ```kotlin | 394 | ```kotlin |
| 391 | if (result == null) return | 395 | if (result == null) return |
| 392 | 396 | ||
| 397 | if (it.getColumnIndex("rejected") > -1) return | ||
| 398 | |||
| 393 | if (result.moveToFirst()) { | 399 | if (result.moveToFirst()) { |
| 394 | val index = it.getColumnIndex("result") | 400 | val index = it.getColumnIndex("result") |
| 395 | val encryptedText = it.getString(index) | 401 | val encryptedText = it.getString(index) |
| @@ -414,6 +420,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 414 | ```kotlin | 420 | ```kotlin |
| 415 | if (result == null) return | 421 | if (result == null) return |
| 416 | 422 | ||
| 423 | if (it.getColumnIndex("rejected") > -1) return | ||
| 424 | |||
| 417 | if (result.moveToFirst()) { | 425 | if (result.moveToFirst()) { |
| 418 | val index = it.getColumnIndex("result") | 426 | val index = it.getColumnIndex("result") |
| 419 | val encryptedText = it.getString(index) | 427 | val encryptedText = it.getString(index) |
| @@ -438,6 +446,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 438 | ```kotlin | 446 | ```kotlin |
| 439 | if (result == null) return | 447 | if (result == null) return |
| 440 | 448 | ||
| 449 | if (it.getColumnIndex("rejected") > -1) return | ||
| 450 | |||
| 441 | if (result.moveToFirst()) { | 451 | if (result.moveToFirst()) { |
| 442 | val index = it.getColumnIndex("result") | 452 | val index = it.getColumnIndex("result") |
| 443 | val encryptedText = it.getString(index) | 453 | val encryptedText = it.getString(index) |
| @@ -462,6 +472,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 462 | ```kotlin | 472 | ```kotlin |
| 463 | if (result == null) return | 473 | if (result == null) return |
| 464 | 474 | ||
| 475 | if (it.getColumnIndex("rejected") > -1) return | ||
| 476 | |||
| 465 | if (result.moveToFirst()) { | 477 | if (result.moveToFirst()) { |
| 466 | val index = it.getColumnIndex("result") | 478 | val index = it.getColumnIndex("result") |
| 467 | val encryptedText = it.getString(index) | 479 | val encryptedText = it.getString(index) |
| @@ -486,6 +498,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 486 | ```kotlin | 498 | ```kotlin |
| 487 | if (result == null) return | 499 | if (result == null) return |
| 488 | 500 | ||
| 501 | if (it.getColumnIndex("rejected") > -1) return | ||
| 502 | |||
| 489 | if (result.moveToFirst()) { | 503 | if (result.moveToFirst()) { |
| 490 | val index = it.getColumnIndex("result") | 504 | val index = it.getColumnIndex("result") |
| 491 | val relayJsonText = it.getString(index) | 505 | val relayJsonText = it.getString(index) |
| @@ -510,6 +524,8 @@ If the user chose to always reject the event, signer application will return the | |||
| 510 | ```kotlin | 524 | ```kotlin |
| 511 | if (result == null) return | 525 | if (result == null) return |
| 512 | 526 | ||
| 527 | if (it.getColumnIndex("rejected") > -1) return | ||
| 528 | |||
| 513 | if (result.moveToFirst()) { | 529 | if (result.moveToFirst()) { |
| 514 | val index = it.getColumnIndex("result") | 530 | val index = it.getColumnIndex("result") |
| 515 | val eventJson = it.getString(index) | 531 | val eventJson = it.getString(index) |