Don't show error messages before restoration

This commit is contained in:
Ryan ZHAO
2020-08-21 15:39:13 +10:00
parent 82fb950956
commit ad5b2eceb7
2 changed files with 26 additions and 18 deletions

View File

@@ -30,6 +30,12 @@ object SessionMetaProtocol {
return shouldIgnoreMessage
}
@JvmStatic
fun shouldErrorMessageShow(context: Context, timestamp: Long): Boolean {
val restorationTimestamp = TextSecurePreferences.getRestorationTime(context)
return timestamp > restorationTimestamp
}
@JvmStatic
fun handleProfileUpdateIfNeeded(context: Context, content: SignalServiceContent) {
val rawDisplayName = content.senderDisplayName.orNull() ?: return