Merge branch 'vitorpamplona:main' into profiles-list-management
This commit is contained in:
@@ -12,12 +12,7 @@
|
||||
"package_name": "com.vitorpamplona.amethyst"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyB7ZxgdpgrN6R223HCFdfv4ulP8Egp7trE"
|
||||
@@ -25,12 +20,7 @@
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -41,12 +31,7 @@
|
||||
"package_name": "com.vitorpamplona.amethyst.benchmark"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyB7ZxgdpgrN6R223HCFdfv4ulP8Egp7trE"
|
||||
@@ -54,12 +39,7 @@
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -70,12 +50,7 @@
|
||||
"package_name": "com.vitorpamplona.amethyst.debug"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyB7ZxgdpgrN6R223HCFdfv4ulP8Egp7trE"
|
||||
@@ -83,12 +58,7 @@
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,9 +129,6 @@ import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter
|
||||
import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl
|
||||
import com.vitorpamplona.quartz.nip01Core.signers.EventTemplate
|
||||
import com.vitorpamplona.quartz.nip01Core.signers.NostrSigner
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.addressables.taggedAddresses
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.events.taggedEventIds
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.geohash.geohashes
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.hashtags.hashtags
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.people.hasAnyTaggedUser
|
||||
import com.vitorpamplona.quartz.nip01Core.tags.people.taggedUserIds
|
||||
@@ -1805,82 +1802,5 @@ class Account(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scope.launch(Dispatchers.Default) {
|
||||
Log.d("DB UPGRADE", "Migrating List")
|
||||
delay(1000 * 60 * 1)
|
||||
// waits 5 minutes before migrating the list.
|
||||
val contactList = userProfile().latestContactList
|
||||
val oldChannels = contactList?.taggedEventIds()?.toSet()?.mapNotNull { cache.getPublicChatChannelIfExists(it) }
|
||||
|
||||
if (oldChannels != null && oldChannels.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List with ${oldChannels.size} old channels ")
|
||||
val existingChannels = publicChatList.flowSet.value
|
||||
|
||||
val needsToUpgrade = oldChannels.filter { it.idHex !in existingChannels }
|
||||
|
||||
Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ")
|
||||
|
||||
if (needsToUpgrade.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List")
|
||||
runCatching {
|
||||
sendMyPublicAndPrivateOutbox(publicChatList.follow(oldChannels))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val oldCommunities = contactList?.taggedAddresses()?.toSet()?.map { cache.getOrCreateAddressableNote(it) }
|
||||
|
||||
if (oldCommunities != null && oldCommunities.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List with ${oldCommunities.size} old communities ")
|
||||
val existingCommunities = communityList.flowSet.value
|
||||
|
||||
val needsToUpgrade = oldCommunities.filter { it.idHex !in existingCommunities }
|
||||
|
||||
Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ")
|
||||
|
||||
if (needsToUpgrade.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List")
|
||||
runCatching {
|
||||
sendMyPublicAndPrivateOutbox(communityList.follow(oldCommunities))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val oldHashtags = contactList?.hashtags()?.toSet()
|
||||
|
||||
if (oldHashtags != null && oldHashtags.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List with ${oldHashtags.size} old hashtags ")
|
||||
val existingHashtags = hashtagList.flow.value
|
||||
|
||||
val needsToUpgrade = oldHashtags.filter { it !in existingHashtags }
|
||||
|
||||
Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ")
|
||||
|
||||
if (needsToUpgrade.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List")
|
||||
runCatching {
|
||||
sendMyPublicAndPrivateOutbox(hashtagList.follow(oldHashtags.toList()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val oldGeohashes = contactList?.geohashes()?.toSet()
|
||||
if (oldGeohashes != null && oldGeohashes.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List with ${oldGeohashes.size} old geohashes ")
|
||||
val existingGeohashes = geohashList.flow.value
|
||||
|
||||
val needsToUpgrade = oldGeohashes.filter { it !in existingGeohashes }
|
||||
|
||||
Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ")
|
||||
|
||||
if (needsToUpgrade.isNotEmpty()) {
|
||||
Log.d("DB UPGRADE", "Migrating List")
|
||||
runCatching {
|
||||
sendMyPublicAndPrivateOutbox(geohashList.follow(oldGeohashes.toList()))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ benchmark = "1.4.0"
|
||||
benchmarkJunit4 = "1.4.0"
|
||||
biometricKtx = "1.2.0-alpha05"
|
||||
coil = "3.3.0"
|
||||
composeBom = "2025.08.00"
|
||||
composeBom = "2025.08.01"
|
||||
coreKtx = "1.17.0"
|
||||
datastore = "1.1.7"
|
||||
espressoCore = "3.7.0"
|
||||
@@ -30,7 +30,7 @@ kotlinxSerialization = "1.9.0"
|
||||
kotlinxSerializationPlugin = "2.2.10"
|
||||
languageId = "17.0.6"
|
||||
lazysodiumAndroid = "5.2.0"
|
||||
lifecycleRuntimeKtx = "2.9.2"
|
||||
lifecycleRuntimeKtx = "2.9.3"
|
||||
lightcompressor = "1.3.3"
|
||||
markdown = "e1151c8"
|
||||
media3 = "1.8.0"
|
||||
|
||||
Reference in New Issue
Block a user