forked from upstream-mirrors/quik
Merge branch 'master' into upgrade-smsmms-group-individual-send-no-wait-appear-delayed-mms-mms-receive-to-worker-send-ack-mmsc
This commit is contained in:
@@ -41,4 +41,6 @@ interface ContactRepository {
|
||||
|
||||
fun setDefaultPhoneNumber(lookupKey: String, phoneNumberId: Long)
|
||||
|
||||
fun isContact(address: String): Boolean
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2025
|
||||
*
|
||||
* This file is part of QUIK.
|
||||
*
|
||||
* QUIK 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.
|
||||
*
|
||||
* QUIK 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 QUIK. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package dev.octoshrimpy.quik.repository
|
||||
|
||||
import dev.octoshrimpy.quik.model.Message
|
||||
import io.realm.Realm
|
||||
|
||||
data class ParsedEmojiReaction(val emoji: String, val originalMessage: String, val isRemoval: Boolean = false)
|
||||
|
||||
interface EmojiReactionRepository {
|
||||
fun parseEmojiReaction(body: String): ParsedEmojiReaction?
|
||||
|
||||
fun findTargetMessage(threadId: Long, originalMessageText: String, realm: Realm): Message?
|
||||
|
||||
fun saveEmojiReaction(
|
||||
reactionMessage: Message,
|
||||
parsedReaction: ParsedEmojiReaction,
|
||||
targetMessage: Message?,
|
||||
realm: Realm,
|
||||
)
|
||||
|
||||
fun deleteAndReparseAllEmojiReactions(realm: Realm)
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
@@ -18,7 +18,9 @@
|
||||
*/
|
||||
package dev.octoshrimpy.quik.repository
|
||||
|
||||
import dev.octoshrimpy.quik.model.Recipient
|
||||
import dev.octoshrimpy.quik.model.ScheduledMessage
|
||||
import io.realm.RealmList
|
||||
import io.realm.RealmResults
|
||||
|
||||
interface ScheduledMessageRepository {
|
||||
@@ -32,9 +34,13 @@ interface ScheduledMessageRepository {
|
||||
recipients: List<String>,
|
||||
sendAsGroup: Boolean,
|
||||
body: String,
|
||||
attachments: List<String>
|
||||
attachments: List<String>,
|
||||
conversationId: Long
|
||||
): ScheduledMessage
|
||||
|
||||
/**
|
||||
* Updates scheduled messages with new uris
|
||||
*/
|
||||
fun updateScheduledMessage(scheduledMessage: ScheduledMessage)
|
||||
|
||||
/**
|
||||
@@ -47,15 +53,24 @@ interface ScheduledMessageRepository {
|
||||
*/
|
||||
fun getScheduledMessage(id: Long): ScheduledMessage?
|
||||
|
||||
/**
|
||||
* Returns all scheduled messages with the given [conversationId]
|
||||
*/
|
||||
fun getScheduledMessagesForConversation(conversationId: Long): RealmResults<ScheduledMessage>
|
||||
|
||||
/**
|
||||
* Deletes the scheduled message with the given [id]
|
||||
*/
|
||||
fun deleteScheduledMessage(id: Long)
|
||||
|
||||
// delete multiple scheduled messages by id list
|
||||
/**
|
||||
* Delete multiple scheduled messages by id list
|
||||
*/
|
||||
fun deleteScheduledMessages(ids: List<Long>)
|
||||
|
||||
// get a list of all scheduled message ids (in scheduled date order)
|
||||
/**
|
||||
* Get a list of all scheduled message ids (in scheduled date order)
|
||||
*/
|
||||
fun getAllScheduledMessageIdsSnapshot(): List<Long>
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user