Check for self before getting polls.

This commit is contained in:
Michelle Tang
2025-10-14 15:41:07 -04:00
committed by Cody Henthorne
parent 7b34dc75b3
commit 7b6c2fa729

View File

@@ -498,7 +498,7 @@ class PollTables(context: Context?, databaseHelper: SignalDatabase?) : DatabaseT
* Maps message ids to its associated poll (if it exists)
*/
fun getPollsForMessages(messageIds: Collection<Long>): Map<Long, PollRecord> {
if (messageIds.isEmpty()) {
if (messageIds.isEmpty() || !Recipient.isSelfSet) {
return emptyMap()
}