From 463938768eefbcee1c2fb56acb2fc6b15a83feb6 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Mar 2026 04:18:39 +0000 Subject: [PATCH 1/2] feat: add NIP-62 Request to Vanish screen Add a new screen allowing users to send NIP-62 relay deletion requests. Users can select a specific relay or ALL RELAYS, pick a date (data created before that date will be requested for deletion), and provide an optional reason. Includes confirmation dialog with clear warnings about the irreversible nature of vanish requests. https://claude.ai/code/session_019Xrprdfq6pVN8beYrYUSr4 --- .../vitorpamplona/amethyst/model/Account.kt | 26 ++ .../amethyst/ui/navigation/AppNavigation.kt | 2 + .../amethyst/ui/navigation/routes/Routes.kt | 2 + .../ui/screen/loggedIn/AccountViewModel.kt | 11 + .../relays/vanish/RequestToVanishScreen.kt | 433 ++++++++++++++++++ .../loggedIn/settings/AllSettingsScreen.kt | 8 + amethyst/src/main/res/values/strings.xml | 18 + 7 files changed, 500 insertions(+) create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/RequestToVanishScreen.kt diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index dbe16ea3d4..3bd8774198 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -185,6 +185,7 @@ import com.vitorpamplona.quartz.nip57Zaps.zapraiser.zapraiser import com.vitorpamplona.quartz.nip59Giftwrap.WrappedEvent import com.vitorpamplona.quartz.nip59Giftwrap.rumors.RumorAssembler import com.vitorpamplona.quartz.nip59Giftwrap.wraps.GiftWrapEvent +import com.vitorpamplona.quartz.nip62RequestToVanish.RequestToVanishEvent import com.vitorpamplona.quartz.nip65RelayList.AdvertisedRelayListEvent import com.vitorpamplona.quartz.nip65RelayList.tags.AdvertisedRelayInfo import com.vitorpamplona.quartz.nip68Picture.PictureEvent @@ -2005,6 +2006,31 @@ class Account( suspend fun saveBlockedRelayList(blockedRelays: List) = sendMyPublicAndPrivateOutbox(blockedRelayList.saveRelayList(blockedRelays)) + suspend fun requestToVanish( + relay: String, + reason: String, + createdAt: Long, + ) { + if (!isWriteable()) return + + val template = RequestToVanishEvent.build(relay, reason, createdAt) + val signedEvent = signer.sign(template) + cache.justConsumeMyOwnEvent(signedEvent) + client.send(signedEvent, setOf(NormalizedRelayUrl(relay))) + } + + suspend fun requestToVanishFromEverywhere( + reason: String, + createdAt: Long, + ) { + if (!isWriteable()) return + + val template = RequestToVanishEvent.buildVanishFromEverywhere(reason, createdAt) + val signedEvent = signer.sign(template) + cache.justConsumeMyOwnEvent(signedEvent) + client.send(signedEvent, followPlusAllMineWithIndex.flow.value + client.availableRelaysFlow().value) + } + suspend fun sendNip65RelayList(relays: List) = sendLiterallyEverywhere(nip65RelayList.saveRelayList(relays)) suspend fun sendBlossomServersList(servers: List) = sendMyPublicAndPrivateOutbox(blossomServers.saveBlossomServersList(servers)) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt index 926bce5019..c8921d7e76 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt @@ -112,6 +112,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.relay.RelayFeedScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.AllRelayListScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.RelayInformationScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.eventsync.EventSyncScreen +import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.vanish.RequestToVanishScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.search.SearchScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.AllSettingsScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.NIP47SetupScreen @@ -215,6 +216,7 @@ fun AppNavigation( composableFromEndArgs { UpdateZapAmountScreen(accountViewModel, nav, it.nip47) } composableFromEndArgs { AllRelayListScreen(accountViewModel, nav) } composableFromEnd { EventSyncScreen(accountViewModel, nav) } + composableFromEnd { RequestToVanishScreen(accountViewModel, nav) } composableFromEndArgs { AllMediaServersScreen(accountViewModel, nav) } composableFromEndArgs { UpdateReactionTypeScreen(accountViewModel, nav) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt index f22434cb05..a040c45cf6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt @@ -138,6 +138,8 @@ sealed class Route { @Serializable object EventSync : Route() + @Serializable object RequestToVanish : Route() + @Serializable object EditMediaServers : Route() @Serializable object UpdateReactionType : Route() diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt index 59351fc050..a92e9d53b0 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountViewModel.kt @@ -922,6 +922,17 @@ class AccountViewModel( fun delete(note: Note) = launchSigner { account.delete(note) } + fun requestToVanish( + relay: String, + reason: String, + createdAt: Long, + ) = launchSigner { account.requestToVanish(relay, reason, createdAt) } + + fun requestToVanishFromEverywhere( + reason: String, + createdAt: Long, + ) = launchSigner { account.requestToVanishFromEverywhere(reason, createdAt) } + fun cachedDecrypt(note: Note): String? = account.cachedDecryptContent(note) fun decrypt( diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/RequestToVanishScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/RequestToVanishScreen.kt new file mode 100644 index 0000000000..ff4ea19584 --- /dev/null +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/RequestToVanishScreen.kt @@ -0,0 +1,433 @@ +/* + * Copyright (c) 2025 Vitor Pamplona + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.vanish + +import androidx.compose.foundation.border +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.CalendarMonth +import androidx.compose.material.icons.outlined.DeleteForever +import androidx.compose.material.icons.outlined.Warning +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Checkbox +import androidx.compose.material3.DatePicker +import androidx.compose.material3.DatePickerDialog +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.OutlinedCard +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.TimePicker +import androidx.compose.material3.TimePickerDialog +import androidx.compose.material3.rememberDatePickerState +import androidx.compose.material3.rememberTimePickerState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableLongStateOf +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import com.vitorpamplona.amethyst.R +import com.vitorpamplona.amethyst.ui.components.TextSpinner +import com.vitorpamplona.amethyst.ui.components.TitleExplainer +import com.vitorpamplona.amethyst.ui.navigation.navs.INav +import com.vitorpamplona.amethyst.ui.navigation.topbars.TopBarWithBackButton +import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel +import com.vitorpamplona.amethyst.ui.stringRes +import com.vitorpamplona.amethyst.ui.theme.DividerThickness +import com.vitorpamplona.quartz.nip01Core.relay.normalizer.displayUrl +import com.vitorpamplona.quartz.utils.TimeUtils +import kotlinx.collections.immutable.toImmutableList +import java.text.SimpleDateFormat +import java.time.Instant +import java.time.ZoneId +import java.time.ZoneOffset +import java.util.Date +import java.util.Locale + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun RequestToVanishScreen( + accountViewModel: AccountViewModel, + nav: INav, +) { + val connectedRelays by accountViewModel.account.client + .connectedRelaysFlow() + .collectAsStateWithLifecycle() + + var selectedRelayUrl by remember { mutableStateOf(null) } + var allRelaysSelected by remember { mutableStateOf(false) } + var vanishDate by remember { mutableLongStateOf(TimeUtils.now()) } + var reason by remember { mutableStateOf("") } + var showDatePicker by remember { mutableStateOf(false) } + var showTimePicker by remember { mutableStateOf(false) } + var showConfirmDialog by remember { mutableStateOf(false) } + + val datePickerState = + rememberDatePickerState( + initialSelectedDateMillis = vanishDate * 1000, + ) + + val currentTime = Instant.ofEpochMilli(vanishDate * 1000).atZone(ZoneId.systemDefault()).toLocalDateTime() + + val timePickerState = + rememberTimePickerState( + initialHour = currentTime.hour, + initialMinute = currentTime.minute, + is24Hour = false, + ) + + val relayOptions = + remember(connectedRelays) { + connectedRelays + .sortedBy { it.url } + .map { relay -> + TitleExplainer(relay.displayUrl(), relay.url) + }.toImmutableList() + } + + Scaffold( + topBar = { + TopBarWithBackButton(stringRes(id = R.string.request_to_vanish), nav::popBack) + }, + ) { padding -> + Column( + modifier = + Modifier + .padding(padding) + .padding(horizontal = 16.dp) + .verticalScroll(rememberScrollState()), + ) { + Spacer(modifier = Modifier.height(8.dp)) + + // Description + Text( + text = stringRes(R.string.request_to_vanish_description), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Spacer(modifier = Modifier.height(20.dp)) + + // Relay Selection + Text( + text = stringRes(R.string.vanish_target_relay), + style = MaterialTheme.typography.titleSmall, + fontWeight = FontWeight.SemiBold, + ) + + Spacer(modifier = Modifier.height(8.dp)) + + TextSpinner( + label = stringRes(R.string.vanish_target_relay), + placeholder = + if (allRelaysSelected) { + stringRes(R.string.vanish_all_relays) + } else { + selectedRelayUrl ?: stringRes(R.string.vanish_select_relay) + }, + options = relayOptions, + onSelect = { index -> + selectedRelayUrl = relayOptions[index].explainer + allRelaysSelected = false + }, + modifier = Modifier.fillMaxWidth(), + ) + + Spacer(modifier = Modifier.height(12.dp)) + + // ALL RELAYS checkbox + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.fillMaxWidth(), + ) { + Checkbox( + checked = allRelaysSelected, + onCheckedChange = { + allRelaysSelected = it + if (it) selectedRelayUrl = null + }, + ) + Text( + text = stringRes(R.string.vanish_all_relays), + style = MaterialTheme.typography.bodyLarge, + fontWeight = FontWeight.Bold, + color = MaterialTheme.colorScheme.error, + ) + } + + if (allRelaysSelected) { + Row( + modifier = + Modifier + .fillMaxWidth() + .border( + width = 1.dp, + color = MaterialTheme.colorScheme.error, + shape = RoundedCornerShape(8.dp), + ).padding(12.dp), + verticalAlignment = Alignment.Top, + ) { + Icon( + imageVector = Icons.Outlined.Warning, + contentDescription = null, + tint = MaterialTheme.colorScheme.error, + modifier = Modifier.size(24.dp), + ) + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = stringRes(R.string.vanish_all_relays_warning), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.error, + ) + } + } + + Spacer(modifier = Modifier.height(20.dp)) + + HorizontalDivider(thickness = DividerThickness) + + Spacer(modifier = Modifier.height(20.dp)) + + // Date Picker + Text( + text = stringRes(R.string.vanish_date_label), + style = MaterialTheme.typography.titleSmall, + fontWeight = FontWeight.SemiBold, + ) + + Spacer(modifier = Modifier.height(4.dp)) + + Text( + text = stringRes(R.string.vanish_date_explainer), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Spacer(modifier = Modifier.height(8.dp)) + + OutlinedCard( + onClick = { showDatePicker = true }, + modifier = Modifier.fillMaxWidth(), + ) { + Row( + modifier = Modifier.padding(16.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Icon( + Icons.Outlined.CalendarMonth, + contentDescription = stringRes(R.string.vanish_select_date), + ) + Spacer(Modifier.width(12.dp)) + Text( + text = formatTimestamp(vanishDate), + style = MaterialTheme.typography.bodyLarge, + ) + } + } + + Spacer(modifier = Modifier.height(20.dp)) + + HorizontalDivider(thickness = DividerThickness) + + Spacer(modifier = Modifier.height(20.dp)) + + // Reason + OutlinedTextField( + value = reason, + onValueChange = { reason = it }, + label = { Text(stringRes(R.string.vanish_reason_label)) }, + placeholder = { Text(stringRes(R.string.vanish_reason_placeholder)) }, + modifier = Modifier.fillMaxWidth(), + minLines = 2, + maxLines = 4, + ) + + Spacer(modifier = Modifier.height(24.dp)) + + // Send button + Button( + onClick = { showConfirmDialog = true }, + modifier = Modifier.fillMaxWidth(), + enabled = allRelaysSelected || selectedRelayUrl != null, + colors = + ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.error, + ), + ) { + Icon( + Icons.Outlined.DeleteForever, + contentDescription = null, + modifier = Modifier.size(20.dp), + ) + Spacer(Modifier.width(8.dp)) + Text(stringRes(R.string.vanish_send_request)) + } + + Spacer(modifier = Modifier.height(16.dp)) + } + } + + if (showDatePicker) { + DatePickerDialog( + onDismissRequest = { showDatePicker = false }, + confirmButton = { + TextButton(onClick = { + showDatePicker = false + showTimePicker = true + }) { Text(stringRes(R.string.next)) } + }, + ) { + DatePicker(state = datePickerState) + } + } + + if (showTimePicker) { + TimePickerDialog( + title = { + Text(stringRes(R.string.vanish_select_time)) + }, + onDismissRequest = { showTimePicker = false }, + confirmButton = { + TextButton( + onClick = { + val datetimeLocalTimeZone = + datePickerState.selectedDateMillis?.let { localDayAtZeroHourMillis -> + (localDayAtZeroHourMillis / 1000) + + (timePickerState.hour * TimeUtils.ONE_HOUR) + + (timePickerState.minute * TimeUtils.ONE_MINUTE) + } ?: TimeUtils.now() + + val offset: ZoneOffset = ZoneId.systemDefault().rules.getOffset(Instant.now()) + + vanishDate = datetimeLocalTimeZone - offset.totalSeconds + + showTimePicker = false + }, + ) { Text(stringRes(R.string.confirm)) } + }, + ) { + TimePicker(state = timePickerState) + } + } + + if (showConfirmDialog) { + ConfirmVanishDialog( + isAllRelays = allRelaysSelected, + relayUrl = selectedRelayUrl, + onConfirm = { + showConfirmDialog = false + if (allRelaysSelected) { + accountViewModel.requestToVanishFromEverywhere(reason, vanishDate) + } else { + selectedRelayUrl?.let { + accountViewModel.requestToVanish(it, reason, vanishDate) + } + } + accountViewModel.toastManager.toast( + R.string.request_to_vanish, + R.string.vanish_request_sent, + ) + nav.popBack() + }, + onDismiss = { showConfirmDialog = false }, + ) + } +} + +@Composable +private fun ConfirmVanishDialog( + isAllRelays: Boolean, + relayUrl: String?, + onConfirm: () -> Unit, + onDismiss: () -> Unit, +) { + AlertDialog( + onDismissRequest = onDismiss, + icon = { + Icon( + Icons.Outlined.Warning, + contentDescription = null, + tint = MaterialTheme.colorScheme.error, + modifier = Modifier.size(32.dp), + ) + }, + title = { + Text( + text = stringRes(R.string.vanish_confirm_title), + textAlign = TextAlign.Center, + ) + }, + text = { + Text( + text = + if (isAllRelays) { + stringRes(R.string.vanish_confirm_all_relays) + } else { + stringRes(R.string.vanish_confirm_single_relay, relayUrl ?: "") + }, + ) + }, + confirmButton = { + Button( + onClick = onConfirm, + colors = + ButtonDefaults.buttonColors( + containerColor = MaterialTheme.colorScheme.error, + ), + ) { + Text(stringRes(R.string.vanish_send_request)) + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text(stringRes(R.string.cancel)) + } + }, + ) +} + +private fun formatTimestamp(epochSeconds: Long): String { + val sdf = SimpleDateFormat("MMM dd, yyyy hh:mm a", Locale.getDefault()) + return sdf.format(Date(epochSeconds * 1000)) +} diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt index 732ef5fcd1..8974884630 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt @@ -29,6 +29,7 @@ import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Bolt import androidx.compose.material.icons.outlined.CloudUpload +import androidx.compose.material.icons.outlined.DeleteForever import androidx.compose.material.icons.outlined.FavoriteBorder import androidx.compose.material.icons.outlined.Key import androidx.compose.material.icons.outlined.Search @@ -136,6 +137,13 @@ fun AllSettingsScreen( tint = tint, onClick = { nav.nav(Route.AccountBackup) }, ) + HorizontalDivider() + SettingsNavigationRow( + title = R.string.request_to_vanish, + icon = Icons.Outlined.DeleteForever, + tint = MaterialTheme.colorScheme.error, + onClick = { nav.nav(Route.RequestToVanish) }, + ) } HorizontalDivider(thickness = 4.dp) SettingsSectionHeader(R.string.app_settings) diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index 03022e3032..b6a841c902 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -1955,4 +1955,22 @@ Delete Delete this web bookmark? Open URL + + Request to Vanish + Request relays to permanently delete all your data up to the selected date. This action is based on NIP-62 and is legally binding in some jurisdictions. + Select a relay + Target Relay + ALL RELAYS + This will request ALL relays to delete everything associated with your key up to the selected date. This event will be broadcast as widely as possible. This action cannot be undone. + Delete data up to + All your events created before this date will be requested for deletion from the selected relay. + Reason (optional) + Reason or legal notice for the relay operator + Send Vanish Request + Confirm Vanish Request + You are about to request %1$s to permanently delete all your data created before the selected date. This cannot be undone. + You are about to request EVERY relay to permanently delete all your data created before the selected date. This will be broadcast everywhere and cannot be undone. + Vanish request sent + Select date + Select time From 2ed3de8d809d537d9d35c6838081ba9c6b95fb6d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Mar 2026 23:58:10 +0000 Subject: [PATCH 2/2] feat: add Vanish History screen with relay compliance testing Add a new screen that fetches and displays all existing NIP-62 Request to Vanish events from connected relays. Each entry shows the target relays and event date. Per-relay "Test" buttons query the relay for events older than the vanish date to check NIP-62 compliance - if events are found, the relay is flagged as non-compliant. https://claude.ai/code/session_019Xrprdfq6pVN8beYrYUSr4 --- .../amethyst/ui/navigation/AppNavigation.kt | 2 + .../amethyst/ui/navigation/routes/Routes.kt | 2 + .../relays/vanish/VanishEventsScreen.kt | 362 ++++++++++++++++++ .../relays/vanish/VanishEventsViewModel.kt | 203 ++++++++++ .../loggedIn/settings/AllSettingsScreen.kt | 8 + amethyst/src/main/res/values/strings.xml | 13 + 6 files changed, 590 insertions(+) create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsScreen.kt create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsViewModel.kt diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt index c8921d7e76..a1eedaac05 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt @@ -113,6 +113,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.AllRelayListScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.RelayInformationScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.eventsync.EventSyncScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.vanish.RequestToVanishScreen +import com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.vanish.VanishEventsScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.search.SearchScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.AllSettingsScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.NIP47SetupScreen @@ -217,6 +218,7 @@ fun AppNavigation( composableFromEndArgs { AllRelayListScreen(accountViewModel, nav) } composableFromEnd { EventSyncScreen(accountViewModel, nav) } composableFromEnd { RequestToVanishScreen(accountViewModel, nav) } + composableFromEnd { VanishEventsScreen(accountViewModel, nav) } composableFromEndArgs { AllMediaServersScreen(accountViewModel, nav) } composableFromEndArgs { UpdateReactionTypeScreen(accountViewModel, nav) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt index a040c45cf6..429d87a58c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/Routes.kt @@ -140,6 +140,8 @@ sealed class Route { @Serializable object RequestToVanish : Route() + @Serializable object VanishEvents : Route() + @Serializable object EditMediaServers : Route() @Serializable object UpdateReactionType : Route() diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsScreen.kt new file mode 100644 index 0000000000..67ad7b894e --- /dev/null +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsScreen.kt @@ -0,0 +1,362 @@ +/* + * Copyright (c) 2025 Vitor Pamplona + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.vanish + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.CheckCircle +import androidx.compose.material.icons.outlined.Error +import androidx.compose.material.icons.outlined.PublicOff +import androidx.compose.material.icons.outlined.Science +import androidx.compose.material.icons.outlined.Warning +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.material3.CircularProgressIndicator +import androidx.compose.material3.FilledTonalButton +import androidx.compose.material3.HorizontalDivider +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.unit.dp +import androidx.lifecycle.compose.collectAsStateWithLifecycle +import androidx.lifecycle.viewmodel.compose.viewModel +import com.vitorpamplona.amethyst.R +import com.vitorpamplona.amethyst.ui.navigation.navs.INav +import com.vitorpamplona.amethyst.ui.navigation.topbars.TopBarWithBackButton +import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel +import com.vitorpamplona.amethyst.ui.stringRes +import com.vitorpamplona.amethyst.ui.theme.DividerThickness +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale + +@Composable +fun VanishEventsScreen( + accountViewModel: AccountViewModel, + nav: INav, +) { + val viewModel: VanishEventsViewModel = viewModel() + viewModel.account = accountViewModel.account + + val vanishEvents by viewModel.vanishEvents.collectAsStateWithLifecycle() + val isLoading by viewModel.isLoading.collectAsStateWithLifecycle() + val complianceResults by viewModel.complianceResults.collectAsStateWithLifecycle() + + LaunchedEffect(Unit) { + viewModel.load() + } + + Scaffold( + topBar = { + TopBarWithBackButton( + stringRes(id = R.string.vanish_events_title), + nav::popBack, + ) + }, + ) { padding -> + Box( + modifier = + Modifier + .fillMaxSize() + .padding(padding), + ) { + if (isLoading) { + CircularProgressIndicator( + modifier = Modifier.align(Alignment.Center), + ) + } else if (vanishEvents.isEmpty()) { + Column( + modifier = Modifier.align(Alignment.Center).padding(32.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Icon( + Icons.Outlined.PublicOff, + contentDescription = null, + modifier = Modifier.size(48.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Spacer(modifier = Modifier.height(16.dp)) + Text( + text = stringRes(R.string.vanish_events_empty), + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Spacer(modifier = Modifier.height(8.dp)) + Text( + text = stringRes(R.string.vanish_events_empty_hint), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } else { + LazyColumn( + modifier = Modifier.fillMaxSize(), + ) { + item { + Text( + text = stringRes(R.string.vanish_events_description), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp), + ) + } + + items(vanishEvents, key = { it.event.id }) { item -> + VanishEventCard( + item = item, + complianceResults = complianceResults, + onTestCompliance = { relayUrl, date -> + viewModel.testCompliance(relayUrl, date) + }, + ) + } + + item { Spacer(modifier = Modifier.height(16.dp)) } + } + } + } + } +} + +@Composable +private fun VanishEventCard( + item: VanishEventItem, + complianceResults: Map, + onTestCompliance: (String, Long) -> Unit, +) { + Card( + modifier = + Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 6.dp), + colors = + CardDefaults.cardColors( + containerColor = MaterialTheme.colorScheme.surfaceContainerLow, + ), + ) { + Column(modifier = Modifier.padding(16.dp)) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = stringRes(R.string.vanish_date_label), + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Text( + text = formatTimestamp(item.event.createdAt), + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.SemiBold, + ) + } + + Spacer(modifier = Modifier.height(8.dp)) + + HorizontalDivider(thickness = DividerThickness) + + Spacer(modifier = Modifier.height(8.dp)) + + if (item.isAllRelays) { + Row(verticalAlignment = Alignment.CenterVertically) { + Icon( + Icons.Outlined.Warning, + contentDescription = null, + tint = MaterialTheme.colorScheme.error, + modifier = Modifier.size(16.dp), + ) + Spacer(modifier = Modifier.width(6.dp)) + Text( + text = stringRes(R.string.vanish_all_relays), + style = MaterialTheme.typography.bodyMedium, + fontWeight = FontWeight.Bold, + color = MaterialTheme.colorScheme.error, + ) + } + + Spacer(modifier = Modifier.height(8.dp)) + + Text( + text = stringRes(R.string.vanish_all_relays_compliance_hint), + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } else { + Text( + text = stringRes(R.string.vanish_target_relays_label), + style = MaterialTheme.typography.labelMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Spacer(modifier = Modifier.height(4.dp)) + + item.relays.forEach { relayUrl -> + RelayComplianceRow( + relayUrl = relayUrl, + vanishDate = item.event.createdAt, + status = complianceResults["$relayUrl:${item.event.createdAt}"] ?: ComplianceStatus.UNTESTED, + onTest = { onTestCompliance(relayUrl, item.event.createdAt) }, + ) + } + } + + if (item.event.content.isNotBlank()) { + Spacer(modifier = Modifier.height(8.dp)) + HorizontalDivider(thickness = DividerThickness) + Spacer(modifier = Modifier.height(8.dp)) + Text( + text = item.event.content, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + maxLines = 3, + overflow = TextOverflow.Ellipsis, + ) + } + } + } +} + +@Composable +private fun RelayComplianceRow( + relayUrl: String, + vanishDate: Long, + status: ComplianceStatus, + onTest: () -> Unit, +) { + Row( + modifier = + Modifier + .fillMaxWidth() + .padding(vertical = 4.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = + relayUrl + .removePrefix("wss://") + .removePrefix("ws://") + .removeSuffix("/"), + style = MaterialTheme.typography.bodyMedium, + modifier = Modifier.weight(1f), + maxLines = 1, + overflow = TextOverflow.Ellipsis, + ) + + Spacer(modifier = Modifier.width(8.dp)) + + when (status) { + ComplianceStatus.UNTESTED -> { + FilledTonalButton( + onClick = onTest, + modifier = Modifier.height(32.dp), + contentPadding = ButtonDefaults.TextButtonContentPadding, + ) { + Icon( + Icons.Outlined.Science, + contentDescription = null, + modifier = Modifier.size(16.dp), + ) + Spacer(modifier = Modifier.width(4.dp)) + Text( + stringRes(R.string.vanish_test_button), + style = MaterialTheme.typography.labelSmall, + ) + } + } + + ComplianceStatus.TESTING -> { + CircularProgressIndicator(modifier = Modifier.size(20.dp), strokeWidth = 2.dp) + } + + ComplianceStatus.COMPLIANT -> { + Icon( + Icons.Outlined.CheckCircle, + contentDescription = stringRes(R.string.vanish_compliant), + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(20.dp), + ) + Spacer(modifier = Modifier.width(4.dp)) + Text( + stringRes(R.string.vanish_compliant), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.primary, + ) + } + + ComplianceStatus.NON_COMPLIANT -> { + Icon( + Icons.Outlined.Error, + contentDescription = stringRes(R.string.vanish_non_compliant), + tint = MaterialTheme.colorScheme.error, + modifier = Modifier.size(20.dp), + ) + Spacer(modifier = Modifier.width(4.dp)) + Text( + stringRes(R.string.vanish_non_compliant), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.error, + ) + } + + ComplianceStatus.ERROR -> { + Icon( + Icons.Outlined.Error, + contentDescription = stringRes(R.string.vanish_test_error), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(20.dp), + ) + Spacer(modifier = Modifier.width(4.dp)) + Text( + stringRes(R.string.vanish_test_error), + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + } +} + +private fun formatTimestamp(epochSeconds: Long): String { + val sdf = SimpleDateFormat("MMM dd, yyyy hh:mm a", Locale.getDefault()) + return sdf.format(Date(epochSeconds * 1000)) +} diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsViewModel.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsViewModel.kt new file mode 100644 index 0000000000..af40bba459 --- /dev/null +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/vanish/VanishEventsViewModel.kt @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2025 Vitor Pamplona + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +package com.vitorpamplona.amethyst.ui.screen.loggedIn.relays.vanish + +import androidx.compose.runtime.Stable +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.vitorpamplona.amethyst.model.Account +import com.vitorpamplona.quartz.nip01Core.core.Event +import com.vitorpamplona.quartz.nip01Core.relay.client.accessories.downloadFirstEvent +import com.vitorpamplona.quartz.nip01Core.relay.client.reqs.IRequestListener +import com.vitorpamplona.quartz.nip01Core.relay.client.single.newSubId +import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter +import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl +import com.vitorpamplona.quartz.nip62RequestToVanish.RequestToVanishEvent +import com.vitorpamplona.quartz.nip62RequestToVanish.tags.RelayTag +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.channels.Channel +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch +import kotlinx.coroutines.withTimeoutOrNull + +@Stable +data class VanishEventItem( + val event: RequestToVanishEvent, + val relays: List, + val isAllRelays: Boolean, + val sourceRelay: NormalizedRelayUrl, +) + +enum class ComplianceStatus { + UNTESTED, + TESTING, + COMPLIANT, + NON_COMPLIANT, + ERROR, +} + +class VanishEventsViewModel : ViewModel() { + lateinit var account: Account + + private val _vanishEvents = MutableStateFlow>(emptyList()) + val vanishEvents = _vanishEvents.asStateFlow() + + private val _isLoading = MutableStateFlow(false) + val isLoading = _isLoading.asStateFlow() + + private val _complianceResults = MutableStateFlow>(emptyMap()) + val complianceResults = _complianceResults.asStateFlow() + + fun load() { + viewModelScope.launch(Dispatchers.IO) { + _isLoading.value = true + _vanishEvents.value = emptyList() + _complianceResults.value = emptyMap() + + val connectedRelays = account.client.connectedRelaysFlow().value + if (connectedRelays.isEmpty()) { + _isLoading.value = false + return@launch + } + + val filter = + Filter( + kinds = listOf(RequestToVanishEvent.KIND), + authors = listOf(account.pubKey), + limit = 100, + ) + + val filtersPerRelay = connectedRelays.associateWith { listOf(filter) } + val events = mutableListOf() + val seenIds = mutableSetOf() + val subId = newSubId() + val doneChannel = Channel(Channel.CONFLATED) + var eoseCount = 0 + val totalRelays = connectedRelays.size + + val listener = + object : IRequestListener { + override fun onEvent( + event: Event, + isLive: Boolean, + relay: NormalizedRelayUrl, + forFilters: List?, + ) { + if (event is RequestToVanishEvent && seenIds.add(event.id)) { + val relayTags = event.vanishFromRelays() + val isAll = relayTags.contains(RelayTag.EVERYWHERE) + events.add( + VanishEventItem( + event = event, + relays = relayTags, + isAllRelays = isAll, + sourceRelay = relay, + ), + ) + } + } + + override fun onEose( + relay: NormalizedRelayUrl, + forFilters: List?, + ) { + eoseCount++ + if (eoseCount >= totalRelays) { + doneChannel.trySend(Unit) + } + } + + override fun onClosed( + message: String, + relay: NormalizedRelayUrl, + forFilters: List?, + ) { + eoseCount++ + if (eoseCount >= totalRelays) { + doneChannel.trySend(Unit) + } + } + + override fun onCannotConnect( + relay: NormalizedRelayUrl, + message: String, + forFilters: List?, + ) { + eoseCount++ + if (eoseCount >= totalRelays) { + doneChannel.trySend(Unit) + } + } + } + + try { + account.client.openReqSubscription(subId, filtersPerRelay, listener) + + withTimeoutOrNull(15_000) { + doneChannel.receive() + } + } finally { + account.client.close(subId) + doneChannel.close() + } + + _vanishEvents.value = events.sortedByDescending { it.event.createdAt } + _isLoading.value = false + } + } + + fun testCompliance( + relayUrl: String, + vanishDate: Long, + ) { + val key = "$relayUrl:$vanishDate" + _complianceResults.value = _complianceResults.value + (key to ComplianceStatus.TESTING) + + viewModelScope.launch(Dispatchers.IO) { + try { + val foundEvent = + account.client.downloadFirstEvent( + relay = relayUrl, + filter = + Filter( + authors = listOf(account.pubKey), + until = vanishDate, + limit = 1, + ), + ) + + _complianceResults.value = + _complianceResults.value + + ( + key to + if (foundEvent != null) { + ComplianceStatus.NON_COMPLIANT + } else { + ComplianceStatus.COMPLIANT + } + ) + } catch (_: Exception) { + _complianceResults.value = _complianceResults.value + (key to ComplianceStatus.ERROR) + } + } + } +} diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt index 8974884630..8db53f82da 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/AllSettingsScreen.kt @@ -31,6 +31,7 @@ import androidx.compose.material.icons.outlined.Bolt import androidx.compose.material.icons.outlined.CloudUpload import androidx.compose.material.icons.outlined.DeleteForever import androidx.compose.material.icons.outlined.FavoriteBorder +import androidx.compose.material.icons.outlined.History import androidx.compose.material.icons.outlined.Key import androidx.compose.material.icons.outlined.Search import androidx.compose.material.icons.outlined.Security @@ -144,6 +145,13 @@ fun AllSettingsScreen( tint = MaterialTheme.colorScheme.error, onClick = { nav.nav(Route.RequestToVanish) }, ) + HorizontalDivider() + SettingsNavigationRow( + title = R.string.vanish_history, + icon = Icons.Outlined.History, + tint = tint, + onClick = { nav.nav(Route.VanishEvents) }, + ) } HorizontalDivider(thickness = 4.dp) SettingsSectionHeader(R.string.app_settings) diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index b6a841c902..55a0cc83a2 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -1973,4 +1973,17 @@ Vanish request sent Select date Select time + + Vanish History + Refresh + These are your past Request to Vanish events found on connected relays. Relays tagged in these events should not hold any of your data from before the event date. + No vanish requests found + You haven\'t sent any Request to Vanish events yet. + Target Relays + This request targets all relays. Use the Request to Vanish screen to test specific relays for compliance. + Test + Compliant + Non-compliant + Error + Vanish History