forked from upstream-mirrors/quik
Fix group conversations not being sent as group messages by defualt
This was the default behavior in the past, and should remain like this.
This commit is contained in:
@@ -190,6 +190,7 @@ class SyncRepositoryImpl @Inject constructor(
|
||||
name = persistedConversation.name
|
||||
blockingClient = persistedConversation.blockingClient
|
||||
blockReason = persistedConversation.blockReason
|
||||
sendAsGroup = persistedConversation.sendAsGroup
|
||||
}
|
||||
lastMessage = realm.where(Message::class.java)
|
||||
.sort("date", Sort.DESCENDING)
|
||||
|
||||
@@ -38,7 +38,7 @@ open class Conversation(
|
||||
|
||||
var name: String = "", // custom title
|
||||
|
||||
var sendAsGroup: Boolean = false,
|
||||
var sendAsGroup: Boolean = true,
|
||||
) : RealmObject() {
|
||||
|
||||
val date: Long get() = lastMessage?.date ?: if (draft.isNotEmpty()) draftDate else 0
|
||||
|
||||
@@ -63,18 +63,18 @@ interface ConversationRepository {
|
||||
|
||||
fun getRecipient(recipientId: Long): Recipient?
|
||||
|
||||
fun getOrCreateConversation(threadId: Long, sendAsGroup: Boolean = false): Conversation?
|
||||
fun getOrCreateConversation(threadId: Long, sendAsGroup: Boolean = true): Conversation?
|
||||
|
||||
fun createConversation(threadId: Long, sendAsGroup: Boolean = false): Conversation?
|
||||
fun createConversation(threadId: Long, sendAsGroup: Boolean = true): Conversation?
|
||||
|
||||
fun getConversation(addresses: Collection<String>): Conversation?
|
||||
|
||||
fun getOrCreateConversation(
|
||||
addresses: Collection<String>, sendAsGroup: Boolean = false
|
||||
addresses: Collection<String>, sendAsGroup: Boolean = true
|
||||
): Conversation?
|
||||
|
||||
fun createConversation(
|
||||
addresses: Collection<String>, sendAsGroup: Boolean = false
|
||||
addresses: Collection<String>, sendAsGroup: Boolean = true
|
||||
): Conversation?
|
||||
|
||||
fun saveDraft(threadId: Long, draft: String)
|
||||
|
||||
Reference in New Issue
Block a user