message content filter feature initial implementation

This commit is contained in:
peanut250
2025-07-07 15:30:12 -05:00
parent 4e9e382f69
commit 66f165cccf
23 changed files with 715 additions and 3 deletions
@@ -41,4 +41,6 @@ interface ContactRepository {
fun setDefaultPhoneNumber(lookupKey: String, phoneNumberId: Long)
fun isContact(address: String): Boolean
}
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
*
* This file is part of QKSMS.
*
* QKSMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* QKSMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/
package dev.octoshrimpy.quik.repository
import dev.octoshrimpy.quik.model.MessageContentFilter
import dev.octoshrimpy.quik.model.MessageContentFilterData
import io.realm.RealmResults
interface MessageContentFilterRepository {
fun createFilter(data: MessageContentFilterData)
fun getMessageContentFilters(): RealmResults<MessageContentFilter>
fun getMessageContentFilter(id: Long): MessageContentFilter?
fun isBlocked(messageBody: String, address: String, contactsRepo: ContactRepository): Boolean
fun removeFilter(id: Long)
}