mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-02-22 13:19:00 +00:00
[NIP-55] - Add the rejected permission check in the code samples (#1755)
This commit is contained in:
parent
546b897fd7
commit
57c84cc87a
16
55.md
16
55.md
@ -339,6 +339,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
if (index < 0) return
|
if (index < 0) return
|
||||||
@ -364,6 +366,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val indexJson = it.getColumnIndex("event")
|
val indexJson = it.getColumnIndex("event")
|
||||||
@ -390,6 +394,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val encryptedText = it.getString(index)
|
val encryptedText = it.getString(index)
|
||||||
@ -414,6 +420,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val encryptedText = it.getString(index)
|
val encryptedText = it.getString(index)
|
||||||
@ -438,6 +446,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val encryptedText = it.getString(index)
|
val encryptedText = it.getString(index)
|
||||||
@ -462,6 +472,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val encryptedText = it.getString(index)
|
val encryptedText = it.getString(index)
|
||||||
@ -486,6 +498,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val relayJsonText = it.getString(index)
|
val relayJsonText = it.getString(index)
|
||||||
@ -510,6 +524,8 @@ If the user chose to always reject the event, signer application will return the
|
|||||||
```kotlin
|
```kotlin
|
||||||
if (result == null) return
|
if (result == null) return
|
||||||
|
|
||||||
|
if (it.getColumnIndex("rejected") > -1) return
|
||||||
|
|
||||||
if (result.moveToFirst()) {
|
if (result.moveToFirst()) {
|
||||||
val index = it.getColumnIndex("result")
|
val index = it.getColumnIndex("result")
|
||||||
val eventJson = it.getString(index)
|
val eventJson = it.getString(index)
|
||||||
|
Loading…
Reference in New Issue
Block a user