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
|
name = persistedConversation.name
|
||||||
blockingClient = persistedConversation.blockingClient
|
blockingClient = persistedConversation.blockingClient
|
||||||
blockReason = persistedConversation.blockReason
|
blockReason = persistedConversation.blockReason
|
||||||
|
sendAsGroup = persistedConversation.sendAsGroup
|
||||||
}
|
}
|
||||||
lastMessage = realm.where(Message::class.java)
|
lastMessage = realm.where(Message::class.java)
|
||||||
.sort("date", Sort.DESCENDING)
|
.sort("date", Sort.DESCENDING)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ open class Conversation(
|
|||||||
|
|
||||||
var name: String = "", // custom title
|
var name: String = "", // custom title
|
||||||
|
|
||||||
var sendAsGroup: Boolean = false,
|
var sendAsGroup: Boolean = true,
|
||||||
) : RealmObject() {
|
) : RealmObject() {
|
||||||
|
|
||||||
val date: Long get() = lastMessage?.date ?: if (draft.isNotEmpty()) draftDate else 0
|
val date: Long get() = lastMessage?.date ?: if (draft.isNotEmpty()) draftDate else 0
|
||||||
|
|||||||
@@ -63,18 +63,18 @@ interface ConversationRepository {
|
|||||||
|
|
||||||
fun getRecipient(recipientId: Long): Recipient?
|
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 getConversation(addresses: Collection<String>): Conversation?
|
||||||
|
|
||||||
fun getOrCreateConversation(
|
fun getOrCreateConversation(
|
||||||
addresses: Collection<String>, sendAsGroup: Boolean = false
|
addresses: Collection<String>, sendAsGroup: Boolean = true
|
||||||
): Conversation?
|
): Conversation?
|
||||||
|
|
||||||
fun createConversation(
|
fun createConversation(
|
||||||
addresses: Collection<String>, sendAsGroup: Boolean = false
|
addresses: Collection<String>, sendAsGroup: Boolean = true
|
||||||
): Conversation?
|
): Conversation?
|
||||||
|
|
||||||
fun saveDraft(threadId: Long, draft: String)
|
fun saveDraft(threadId: Long, draft: String)
|
||||||
|
|||||||
Reference in New Issue
Block a user