Skip to content

Commit 3c6dc96

Browse files
committed
Merge branch 'molly-7.36'
2 parents b7bdead + a765167 commit 3c6dc96

File tree

728 files changed

+17074
-10496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

728 files changed

+17074
-10496
lines changed

app/build.gradle.kts

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ plugins {
1111
id("molly")
1212
}
1313

14-
val canonicalVersionCode = 1512
15-
val canonicalVersionName = "7.33.2"
14+
val canonicalVersionCode = 1519
15+
val canonicalVersionName = "7.36.2"
1616
val currentHotfixVersion = 0
1717
val maxHotfixVersions = 100
1818
val mollyRevision = 1
@@ -199,7 +199,6 @@ android {
199199
buildConfigField("int", "CONTENT_PROXY_PORT", "443")
200200
buildConfigField("String", "SIGNAL_AGENT", "\"OWA\"")
201201
buildConfigField("String", "CDSI_MRENCLAVE", "\"0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57\"")
202-
buildConfigField("String", "SVR2_MRENCLAVE_LEGACY", "\"a6622ad4656e1abcd0bc0ff17c229477747d2ded0495c4ebee7ed35c1789fa97\"")
203202
buildConfigField("String", "SVR2_MRENCLAVE", "\"9314436a9a144992bb3680770ea5fd7934a7ffd29257844a33763a238903d570\"")
204203
buildConfigField("String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\"")
205204
buildConfigField("String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94GXTLfN0/vLt98KDPnxwAQL9j5V1jGOY8jQl6MLxEs56cwXN0dqCnImzVH3TZT1cJ8SW1BRX6qIVxEzjsSGx3yxF3suAilPMqGRp4ffyopjMD1JXiKR2RwLKzizUe5e8XyGOy9fplzhw3jVzTRyUZTRSZKkMLWcQ/gv0E4aONNqs4P+NameAZYOD12qRkxosQQP5uux6B2nRyZ7sAV54DgFyLiRcq1FvwKw2EPQdk4HDoePrO/RNUbyNddnM/mMgj4FW65xCoT1LmjrIjsv/Ggdlx46ueczhMgtBunx1/w8k8V+l8LVZ8gAT6wkU5J+DPQalQguMg12Jzug3q4TbdHiGCmD9EunCwOmsLuLJkz6EcSYXtrlDEnAM+hicw7iergYLLlMXpfTdGxJCWJmP4zqUFeTTmsmhsjGBt7NiEB/9pFFEB3pSbf4iiUukw63Eo8Aqnf4iwob6X1QviCWuc8t0LUlT9vALgh/f2DPVOOmR0RW6bgRvc7DSF20V/omg+YBw==\"")
@@ -338,7 +337,6 @@ android {
338337
buildConfigField("String", "SIGNAL_CDN3_URL", "\"https://cdn3-staging.signal.org\"")
339338
buildConfigField("String", "SIGNAL_CDSI_URL", "\"https://cdsi.staging.signal.org\"")
340339
buildConfigField("String", "SIGNAL_SVR2_URL", "\"https://svr2.staging.signal.org\"")
341-
buildConfigField("String", "SVR2_MRENCLAVE_LEGACY", "\"acb1973aa0bbbd14b3b4e06f145497d948fd4a98efc500fcce363b3b743ec482\"")
342340
buildConfigField("String", "SVR2_MRENCLAVE", "\"38e01eff4fe357dc0b0e8ef7a44b4abc5489fbccba3a78780f3872c277f62bf3\"")
343341
buildConfigField("String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx\"")
344342
buildConfigField("String", "ZKGROUP_SERVER_PUBLIC_PARAMS", "\"ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdlukrpzzsCIvEwjwQlJYVPOQPj4V0F4UXXBdHSLK05uoPBCQG8G9rYIGedYsClJXnbrgGYG3eMTG5hnx4X4ntARBgELuMWWUEEfSK0mjXg+/2lPmWcTZWR9nkqgQQP0tbzuiPm74H2wMO4u1Wafe+UwyIlIT9L7KLS19Aw8r4sPrXZSSsOZ6s7M1+rTJN0bI5CKY2PX29y5Ok3jSWufIKcgKOnWoP67d5b2du2ZVJjpjfibNIHbT/cegy/sBLoFwtHogVYUewANUAXIaMPyCLRArsKhfJ5wBtTminG/PAvuBdJ70Z/bXVPf8TVsR292zQ65xwvWTejROW6AZX6aqucUjlENAErBme1YHmOSpU6tr6doJ66dPzVAWIanmO/5mgjNEDeK7DDqQdB1xd03HT2Qs2TxY3kCK8aAb/0iM0HQiXjxZ9HIgYhbtvGEnDKW5ILSUydqH/KBhW4Pb0jZWnqN/YgbWDKeJxnDbYcUob5ZY5Lt5ZCMKuaGUvCJRrCtuugSMaqjowCGRempsDdJEt+cMaalhZ6gczklJB/IbdwENW9KeVFPoFNFzhxWUIS5ML9riVYhAtE6JE5jX0xiHNVIIPthb458cfA8daR0nYfYAUKogQArm0iBezOO+mPk5vCNWI+wwkyFCqNDXz/qxl1gAntuCJtSfq9OC3NkdhQlgYQ==\"")
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

app/src/androidTest/java/org/thoughtcrime/securesms/conversation/v2/items/V2ConversationItemShapeTest.kt

+4
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,11 @@ class V2ConversationItemShapeTest {
331331
override fun onMessageRequestAcceptOptionsClicked() = Unit
332332

333333
override fun onItemDoubleClick(item: MultiselectPart) = Unit
334+
334335
override fun onPaymentTombstoneClicked() = Unit
336+
335337
override fun onDisplayMediaNoLongerAvailableSheet() = Unit
338+
339+
override fun onShowUnverifiedProfileSheet(forGroup: Boolean) = Unit
336340
}
337341
}

app/src/androidTest/java/org/thoughtcrime/securesms/database/RecipientTableTest.kt

+9-31
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class RecipientTableTest {
2727
SignalDatabase.recipients.setProfileName(hiddenRecipient, ProfileName.fromParts("Hidden", "Person"))
2828
SignalDatabase.recipients.markHidden(hiddenRecipient)
2929

30-
val results = SignalDatabase.recipients.queryAllContacts("Hidden")!!
30+
val results = SignalDatabase.recipients.queryAllContacts("Hidden", RecipientTable.IncludeSelfMode.Exclude)!!
3131

3232
assertEquals(1, results.count)
3333
}
@@ -38,7 +38,7 @@ class RecipientTableTest {
3838
SignalDatabase.recipients.setProfileName(hiddenRecipient, ProfileName.fromParts("Hidden", "Person"))
3939
SignalDatabase.recipients.markHidden(hiddenRecipient)
4040

41-
val results: MutableList<RecipientId> = SignalDatabase.recipients.getSignalContacts(false)?.use {
41+
val results: MutableList<RecipientId> = SignalDatabase.recipients.getSignalContacts(RecipientTable.IncludeSelfMode.Exclude).use {
4242
val ids = mutableListOf<RecipientId>()
4343
while (it.moveToNext()) {
4444
ids.add(RecipientId.from(CursorUtil.requireLong(it, RecipientTable.ID)))
@@ -57,18 +57,7 @@ class RecipientTableTest {
5757
SignalDatabase.recipients.setProfileName(hiddenRecipient, ProfileName.fromParts("Hidden", "Person"))
5858
SignalDatabase.recipients.markHidden(hiddenRecipient)
5959

60-
val results = SignalDatabase.recipients.querySignalContacts(RecipientTable.ContactSearchQuery("Hidden", false))!!
61-
62-
assertEquals(0, results.count)
63-
}
64-
65-
@Test
66-
fun givenAHiddenRecipient_whenIQueryNonGroupContacts_thenIDoNotExpectHiddenToBeReturned() {
67-
val hiddenRecipient = harness.others[0]
68-
SignalDatabase.recipients.setProfileName(hiddenRecipient, ProfileName.fromParts("Hidden", "Person"))
69-
SignalDatabase.recipients.markHidden(hiddenRecipient)
70-
71-
val results = SignalDatabase.recipients.queryNonGroupContacts("Hidden", false)!!
60+
val results = SignalDatabase.recipients.querySignalContacts(RecipientTable.ContactSearchQuery("Hidden", RecipientTable.IncludeSelfMode.Exclude))!!
7261

7362
assertEquals(0, results.count)
7463
}
@@ -79,7 +68,7 @@ class RecipientTableTest {
7968
SignalDatabase.recipients.setProfileName(hiddenRecipient, ProfileName.fromParts("Hidden", "Person"))
8069
SignalDatabase.recipients.markHidden(hiddenRecipient)
8170

82-
val results: MutableList<RecipientId> = SignalDatabase.recipients.getNonGroupContacts(false)?.use {
71+
val results: MutableList<RecipientId> = SignalDatabase.recipients.getNonGroupContacts(RecipientTable.IncludeSelfMode.Exclude)?.use {
8372
val ids = mutableListOf<RecipientId>()
8473
while (it.moveToNext()) {
8574
ids.add(RecipientId.from(CursorUtil.requireLong(it, RecipientTable.ID)))
@@ -98,7 +87,7 @@ class RecipientTableTest {
9887
SignalDatabase.recipients.setProfileName(blockedRecipient, ProfileName.fromParts("Blocked", "Person"))
9988
SignalDatabase.recipients.setBlocked(blockedRecipient, true)
10089

101-
val results = SignalDatabase.recipients.queryAllContacts("Blocked")!!
90+
val results = SignalDatabase.recipients.queryAllContacts("Blocked", RecipientTable.IncludeSelfMode.Exclude)!!
10291

10392
assertEquals(0, results.count)
10493
}
@@ -109,14 +98,14 @@ class RecipientTableTest {
10998
SignalDatabase.recipients.setProfileName(blockedRecipient, ProfileName.fromParts("Blocked", "Person"))
11099
SignalDatabase.recipients.setBlocked(blockedRecipient, true)
111100

112-
val results: MutableList<RecipientId> = SignalDatabase.recipients.getSignalContacts(false)?.use {
101+
val results: MutableList<RecipientId> = SignalDatabase.recipients.getSignalContacts(RecipientTable.IncludeSelfMode.Exclude).use {
113102
val ids = mutableListOf<RecipientId>()
114103
while (it.moveToNext()) {
115104
ids.add(RecipientId.from(CursorUtil.requireLong(it, RecipientTable.ID)))
116105
}
117106

118107
ids
119-
}!!
108+
}
120109

121110
assertNotEquals(0, results.size)
122111
assertFalse(blockedRecipient in results)
@@ -128,18 +117,7 @@ class RecipientTableTest {
128117
SignalDatabase.recipients.setProfileName(blockedRecipient, ProfileName.fromParts("Blocked", "Person"))
129118
SignalDatabase.recipients.setBlocked(blockedRecipient, true)
130119

131-
val results = SignalDatabase.recipients.querySignalContacts(RecipientTable.ContactSearchQuery("Blocked", false))!!
132-
133-
assertEquals(0, results.count)
134-
}
135-
136-
@Test
137-
fun givenABlockedRecipient_whenIQueryNonGroupContacts_thenIDoNotExpectBlockedToBeReturned() {
138-
val blockedRecipient = harness.others[0]
139-
SignalDatabase.recipients.setProfileName(blockedRecipient, ProfileName.fromParts("Blocked", "Person"))
140-
SignalDatabase.recipients.setBlocked(blockedRecipient, true)
141-
142-
val results = SignalDatabase.recipients.queryNonGroupContacts("Blocked", false)!!
120+
val results = SignalDatabase.recipients.querySignalContacts(RecipientTable.ContactSearchQuery("Blocked", RecipientTable.IncludeSelfMode.Exclude))!!
143121

144122
assertEquals(0, results.count)
145123
}
@@ -150,7 +128,7 @@ class RecipientTableTest {
150128
SignalDatabase.recipients.setProfileName(blockedRecipient, ProfileName.fromParts("Blocked", "Person"))
151129
SignalDatabase.recipients.setBlocked(blockedRecipient, true)
152130

153-
val results: MutableList<RecipientId> = SignalDatabase.recipients.getNonGroupContacts(false)?.use {
131+
val results: MutableList<RecipientId> = SignalDatabase.recipients.getNonGroupContacts(RecipientTable.IncludeSelfMode.Exclude)?.use {
154132
val ids = mutableListOf<RecipientId>()
155133
while (it.moveToNext()) {
156134
ids.add(RecipientId.from(CursorUtil.requireLong(it, RecipientTable.ID)))

app/src/androidTest/java/org/thoughtcrime/securesms/testing/MessageContentFuzzer.kt

+15-13
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import org.thoughtcrime.securesms.recipients.Recipient
1111
import org.thoughtcrime.securesms.recipients.RecipientId
1212
import org.whispersystems.signalservice.api.crypto.EnvelopeMetadata
1313
import org.whispersystems.signalservice.api.util.UuidUtil
14+
import org.whispersystems.signalservice.internal.push.AddressableMessage
1415
import org.whispersystems.signalservice.internal.push.AttachmentPointer
1516
import org.whispersystems.signalservice.internal.push.BodyRange
1617
import org.whispersystems.signalservice.internal.push.Content
18+
import org.whispersystems.signalservice.internal.push.ConversationIdentifier
1719
import org.whispersystems.signalservice.internal.push.DataMessage
1820
import org.whispersystems.signalservice.internal.push.EditMessage
1921
import org.whispersystems.signalservice.internal.push.Envelope
@@ -163,13 +165,13 @@ object MessageContentFuzzer {
163165
val conversation = Recipient.resolved(conversationId)
164166
SyncMessage.DeleteForMe.MessageDeletes(
165167
conversation = if (conversation.isGroup) {
166-
SyncMessage.DeleteForMe.ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
168+
ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
167169
} else {
168-
SyncMessage.DeleteForMe.ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
170+
ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
169171
},
170172

171173
messages = conversationDeletes.map { (author, timestamp) ->
172-
SyncMessage.DeleteForMe.AddressableMessage(
174+
AddressableMessage(
173175
authorServiceId = Recipient.resolved(author).requireAci().toString(),
174176
sentTimestamp = timestamp
175177
)
@@ -191,20 +193,20 @@ object MessageContentFuzzer {
191193
val conversation = Recipient.resolved(delete.conversationId)
192194
SyncMessage.DeleteForMe.ConversationDelete(
193195
conversation = if (conversation.isGroup) {
194-
SyncMessage.DeleteForMe.ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
196+
ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
195197
} else {
196-
SyncMessage.DeleteForMe.ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
198+
ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
197199
},
198200

199201
mostRecentMessages = delete.messages.map { (author, timestamp) ->
200-
SyncMessage.DeleteForMe.AddressableMessage(
202+
AddressableMessage(
201203
authorServiceId = Recipient.resolved(author).requireAci().toString(),
202204
sentTimestamp = timestamp
203205
)
204206
},
205207

206208
mostRecentNonExpiringMessages = delete.nonExpiringMessages.map { (author, timestamp) ->
207-
SyncMessage.DeleteForMe.AddressableMessage(
209+
AddressableMessage(
208210
authorServiceId = Recipient.resolved(author).requireAci().toString(),
209211
sentTimestamp = timestamp
210212
)
@@ -228,9 +230,9 @@ object MessageContentFuzzer {
228230
val conversation = Recipient.resolved(conversationId)
229231
SyncMessage.DeleteForMe.LocalOnlyConversationDelete(
230232
conversation = if (conversation.isGroup) {
231-
SyncMessage.DeleteForMe.ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
233+
ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
232234
} else {
233-
SyncMessage.DeleteForMe.ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
235+
ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
234236
}
235237
)
236238
}
@@ -250,15 +252,15 @@ object MessageContentFuzzer {
250252
attachmentDeletes = listOf(
251253
SyncMessage.DeleteForMe.AttachmentDelete(
252254
conversation = if (conversation.isGroup) {
253-
SyncMessage.DeleteForMe.ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
255+
ConversationIdentifier(threadGroupId = conversation.requireGroupId().decodedId.toByteString())
254256
} else {
255-
SyncMessage.DeleteForMe.ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
257+
ConversationIdentifier(threadServiceId = conversation.requireAci().toString())
256258
},
257-
targetMessage = SyncMessage.DeleteForMe.AddressableMessage(
259+
targetMessage = AddressableMessage(
258260
authorServiceId = Recipient.resolved(message.first).requireAci().toString(),
259261
sentTimestamp = message.second
260262
),
261-
uuid = uuid?.let { UuidUtil.toByteString(it) },
263+
clientUuid = uuid?.let { UuidUtil.toByteString(it) },
262264
fallbackDigest = digest?.toByteString(),
263265
fallbackPlaintextHash = plainTextHash?.let { Base64.decodeOrNull(it)?.toByteString() }
264266
)

app/src/debug/java/org/thoughtcrime/securesms/components/settings/app/internal/conversation/test/InternalConversationTestFragment.kt

+4
Original file line numberDiff line numberDiff line change
@@ -307,5 +307,9 @@ class InternalConversationTestFragment : Fragment(R.layout.conversation_test_fra
307307
override fun onMessageRequestAcceptOptionsClicked() {
308308
Toast.makeText(requireContext(), "Can't touch this.", Toast.LENGTH_SHORT).show()
309309
}
310+
311+
override fun onShowUnverifiedProfileSheet(forGroup: Boolean) {
312+
Toast.makeText(requireContext(), "Can't touch this.", Toast.LENGTH_SHORT).show()
313+
}
310314
}
311315
}

0 commit comments

Comments
 (0)