mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 11:27:21 +01:00
First pass updating Twitter verification to X
This commit is contained in:
@@ -87,7 +87,7 @@ class TwitterIdentity(
|
||||
identity: String,
|
||||
proof: String,
|
||||
) : IdentityClaim(identity, proof) {
|
||||
override fun toProofUrl() = "https://twitter.com/$identity/status/$proof"
|
||||
override fun toProofUrl() = "https://x.com/$identity/status/$proof"
|
||||
|
||||
override fun platform() = platform
|
||||
|
||||
@@ -97,7 +97,7 @@ class TwitterIdentity(
|
||||
fun parseProofUrl(proofUrl: String): TwitterIdentity? {
|
||||
return try {
|
||||
if (proofUrl.isBlank()) return null
|
||||
val path = proofUrl.removePrefix("https://twitter.com/").split("?")[0].split("/")
|
||||
val path = proofUrl.removePrefix("https://x.com/").split("?")[0].split("/")
|
||||
|
||||
TwitterIdentity(path[0], path[2])
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user