mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Disallow reacting to pending or failed messages.
This commit is contained in:
@@ -155,3 +155,10 @@ fun MessageRecord.getRecordQuoteType(): QuoteModel.Type {
|
||||
fun MessageRecord.isEditMessage(): Boolean {
|
||||
return this is MediaMmsMessageRecord && isEditMessage
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the given message record can be reacted to.
|
||||
*/
|
||||
fun MessageRecord.isValidReactionTarget(): Boolean {
|
||||
return isSecure && !isPending && !isFailed && !isRemoteDelete && !isUpdate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user