Merge pull request #1332 from aaronkerckhoff/display-own-name-in-quote

Fix bug displaying user ID when quoting own message
This commit is contained in:
ThomasSession 2024-06-20 15:47:16 +10:00 committed by GitHub
commit d3c4e11aec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,7 +72,7 @@ class QuoteView @JvmOverloads constructor(context: Context, attrs: AttributeSet?
// Author
val author = contactDb.getContactWithSessionID(authorPublicKey)
val localNumber = TextSecurePreferences.getLocalNumber(context)
val quoteIsLocalUser = localNumber != null && localNumber == author?.sessionID
val quoteIsLocalUser = localNumber != null && authorPublicKey == localNumber
val authorDisplayName =
if (quoteIsLocalUser) context.getString(R.string.QuoteView_you)