Skip to content

1.26.0 into master #1297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 205 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
7ce9550
Merge branch 'release/1.24.0' into merge/1.24.0
ThomasSession May 30, 2025
abe790d
Merge pull request #1212 from session-foundation/merge/1.24.0
SessionHero01 May 30, 2025
273d151
[Automated] Update translations from Crowdin
ThomasSession Jun 1, 2025
9dbd289
Merge pull request #1217 from session-foundation/feature/update-crowd…
ThomasSession Jun 1, 2025
5a4782d
Merge pull request #1214 from session-foundation/community-loading
SessionHero01 Jun 2, 2025
ae11eaa
SES-1838 - Animated webp broke because of the transform
ThomasSession Jun 2, 2025
da1fc64
SES-3710 - edge to edge message request
ThomasSession Jun 2, 2025
2b10b67
Clea up on unused files and resources
ThomasSession Jun 2, 2025
c1f474c
More unused classes
ThomasSession Jun 3, 2025
ea36509
Merge pull request #1222 from session-foundation/fix/display-animated…
ThomasSession Jun 3, 2025
50271b2
Merge branch 'dev' into feature/backlog-grooming-pt4
ThomasSession Jun 3, 2025
d9cc457
Merge pull request #1223 from session-foundation/feature/backlog-groo…
ThomasSession Jun 3, 2025
5d32b10
First steps to rebuild the camera fragment with camerax instead of th…
ThomasSession Jun 3, 2025
70bbce1
Proper margins and better layout
ThomasSession Jun 3, 2025
0463086
Hiding flip camerra button when only one camera available
ThomasSession Jun 3, 2025
7de521b
Cleaned and simplified camera setup and added orientation management
ThomasSession Jun 4, 2025
f6771e4
Reusing existing pattern
ThomasSession Jun 4, 2025
0bf8fa8
[SES-2449] - Disappear message clean up (#1232)
SessionHero01 Jun 5, 2025
da3dada
Added group member sorting (#1233)
SessionHero01 Jun 5, 2025
61c877d
Updates libsession-util to 1.0.5 (#1234)
SessionHero01 Jun 5, 2025
3289555
Forcing a smaller resolution and downscaling captured jpeg to save si…
ThomasSession Jun 5, 2025
1de1bc1
Changing aspect ratio to match the preview and the captured image
ThomasSession Jun 6, 2025
0acc4f6
Picking the resolution based on memory
ThomasSession Jun 6, 2025
9615734
Merge branch 'dev' into feature/removing-camera1
ThomasSession Jun 6, 2025
26f0380
Merge pull request #1226 from session-foundation/feature/removing-cam…
ThomasSession Jun 6, 2025
f32187f
Merge branch 'dev' into merge/1.25.0_into_dev
ThomasSession Jun 6, 2025
5c7e16e
Merge branch 'dev' into merge/1.25.0_into_dev
ThomasSession Jun 6, 2025
58c8dbf
comment
ThomasSession Jun 6, 2025
ed13dd8
Merge pull request #1235 from session-foundation/merge/1.25.0_into_dev
ThomasSession Jun 6, 2025
4f1f2a8
Removing legacy controls and sticking to default behaviour of playerView
ThomasSession Jun 11, 2025
34d4b22
[SES-3896] - Poller refactoring (#1238)
SessionHero01 Jun 11, 2025
f56cfbf
Leave and enter fullscreen from image and video interactions
ThomasSession Jun 11, 2025
44ee87c
Removing default edge to edge handling (still need to add back manual…
ThomasSession Jun 12, 2025
41e0bfd
Konverted MediaPreviewActivity
ThomasSession Jun 12, 2025
8a7fc11
Better edge to edge handling
ThomasSession Jun 12, 2025
abc5c9c
Better handling of configuration change to show video in fullscreen
ThomasSession Jun 12, 2025
0d3cdd2
Semi transparent toolbar makes the landscape video better
ThomasSession Jun 12, 2025
3e69a81
Remember playback position on pause and resuming when back. Fixing th…
ThomasSession Jun 12, 2025
cc88127
Konvert zoomimageview and added gesture detector to handle tap instea…
ThomasSession Jun 13, 2025
bf6c99c
Fixing the toolbar opacity
ThomasSession Jun 13, 2025
42d76be
Leave group tidy up (#1241)
SessionHero01 Jun 16, 2025
46e5a77
[SES-3913] - Fix community name not updated
SessionHero01 Jun 16, 2025
46c0c79
Show hide rail on FS and added a custom control view for video player
ThomasSession Jun 16, 2025
4b72bd5
[Automated] Update translations from Crowdin
ThomasSession Jun 17, 2025
cc6bd3b
[ses-3973] - fix mention wrongly detected (#1244)
SessionHero01 Jun 17, 2025
83662ab
Merge branch 'dev' into feature/update-crowdin-translations
ThomasSession Jun 17, 2025
fa8529d
Merge pull request #1237 from session-foundation/feature/update-crowd…
ThomasSession Jun 17, 2025
f1bd861
Merge remote-tracking branch 'origin/dev' into merge-1.25.0
SessionHero01 Jun 18, 2025
4b69dc0
Merge pull request #1247 from session-foundation/merge-1.25.0
SessionHero01 Jun 18, 2025
7c957ec
Merge branch 'dev' into fix/video-player
ThomasSession Jun 18, 2025
83af33e
Bringing in changes that were made in 1.25.0 in the java class
ThomasSession Jun 18, 2025
4d1a732
Always hide rail in landscape and set pre-video bg to match theme color
ThomasSession Jun 18, 2025
c3e3c4d
Remove old config system and legacy group message handling (#1243)
SessionHero01 Jun 18, 2025
9234f3b
Position video controls based on rail height
ThomasSession Jun 19, 2025
120cfab
Properly handling blob as providers and renamed files better
ThomasSession Jun 19, 2025
3d73400
files renamed
ThomasSession Jun 19, 2025
3f42491
Proper permission handling for the gallery (videos are back in the ga…
ThomasSession Jun 20, 2025
acda5b0
Merge branch 'dev' into fix/video-player
ThomasSession Jun 20, 2025
456c7a7
Merge branch 'dev' into merge/1.25.0
ThomasSession Jun 20, 2025
17c8ee9
removed todo
ThomasSession Jun 20, 2025
68a872a
Merge pull request #1255 from session-foundation/merge/1.25.0
ThomasSession Jun 20, 2025
70c183e
Merge branch 'dev' into fix/video-player
ThomasSession Jun 20, 2025
e8acfd1
Merge pull request #1239 from session-foundation/fix/video-player
ThomasSession Jun 20, 2025
70fff4f
SES-3804 - Inputtext set to 6 max lines
ThomasSession Jun 20, 2025
194c6e1
Session Pro CTA
ThomasSession Jun 20, 2025
5a7226e
Renamed Primary to Accent
ThomasSession Jun 20, 2025
f563cc3
Moved data class and renamed dialog button data
ThomasSession Jun 20, 2025
57cbbca
Merge pull request #1257 from session-foundation/feature/accent-color
ThomasSession Jun 20, 2025
798c3e7
Merge branch 'dev' into feature/character-limit
ThomasSession Jun 20, 2025
9b71759
Handling no buttons dialog. Added new char limit dialogs
ThomasSession Jun 20, 2025
e25497f
Added debug menu for Pro features
ThomasSession Jun 20, 2025
312d045
Char limit view
ThomasSession Jun 21, 2025
02d0292
[Automated] Update translations from Crowdin
mpretty-cyro Jun 23, 2025
de0521e
Merge remote-tracking branch 'origin/dev' into release/1.24.2
SessionHero01 Jun 23, 2025
b4fd183
Proper char limit colors and ripple tap
ThomasSession Jun 23, 2025
6ce8797
Merge pull request #1258 from session-foundation/release/1.24.2
SessionHero01 Jun 23, 2025
c913051
Proper char limit dialog display and handling of debug menu options
ThomasSession Jun 23, 2025
db56f76
Handling display of Pro badge in input bar
ThomasSession Jun 23, 2025
fac45ae
Verify incoming message length
ThomasSession Jun 23, 2025
0e8dbe0
Added worker for push notification registration (#1259)
SessionHero01 Jun 23, 2025
be8c5de
Read more button in message
ThomasSession Jun 23, 2025
41f13e2
[SES-4023] - New persistent logger (#1260)
SessionHero01 Jun 23, 2025
2b24b62
Merge branch 'dev' into feature/update-crowdin-translations
ThomasSession Jun 24, 2025
f31dfe9
Better overflow logic
ThomasSession Jun 24, 2025
05ef804
Remember expanded messages
ThomasSession Jun 24, 2025
c6dcf38
better scrolling calculations
ThomasSession Jun 24, 2025
c360665
Merge pull request #1256 from session-foundation/feature/update-crowd…
ThomasSession Jun 24, 2025
32cbaa7
Merge branch 'dev' into feature/character-limit
ThomasSession Jun 24, 2025
64508a0
Part of the crowdin strings
ThomasSession Jun 24, 2025
419df32
Auto scroll recyclerview when the keyboard opens if we are already at…
ThomasSession Jun 24, 2025
e60472c
Renamed function
ThomasSession Jun 24, 2025
0896cf4
Merge branch 'dev' into release/1.25.0
ThomasSession Jun 24, 2025
ca0bb75
Removed main thread db call for adapter''s cursor
ThomasSession Jun 24, 2025
0ddae17
Merge pull request #1261 from session-foundation/release/1.25.0
SessionHero01 Jun 24, 2025
b499e75
Merge remote-tracking branch 'origin/master' into dev
SessionHero01 Jun 24, 2025
c299c53
Bump org.mockito:mockito-core from 5.17.0 to 5.18.0 (#1265)
dependabot[bot] Jun 24, 2025
aa443dd
Bump org.assertj:assertj-core from 3.11.1 to 3.27.3
dependabot[bot] Jun 24, 2025
5c14381
Merge pull request #1271 from session-foundation/dependabot/gradle/de…
SessionHero01 Jun 25, 2025
70424bf
Bump actions/setup-java from 2 to 4 (#1262)
dependabot[bot] Jun 25, 2025
f0bdebb
Merge branch 'dev' into master-to-dev
SessionHero01 Jun 25, 2025
80b907c
Bump espressoCoreVersion from 3.5.1 to 3.6.1 (#1263)
dependabot[bot] Jun 25, 2025
3cdc15c
Merge branch 'dev' into master-to-dev
SessionHero01 Jun 25, 2025
ef68f4a
Proper transparent image
ThomasSession Jun 25, 2025
8a512e3
Merge pull request #1269 from session-foundation/master-to-dev
SessionHero01 Jun 25, 2025
6b1f7b1
Merge pull request #1272 from session-foundation/fix-logger-crash
SessionHero01 Jun 25, 2025
60a6dab
Bump media3ExoplayerVersion from 1.4.0 to 1.7.1
dependabot[bot] Jun 25, 2025
10355a6
Made the Pro CTA reusable
ThomasSession Jun 25, 2025
fcea17f
Added shimmer in convo loading
ThomasSession Jun 25, 2025
61f2cce
Merge branch 'dev' into feature/character-limit
ThomasSession Jun 25, 2025
151beb5
Fixed changed string and ropery hiding read more
ThomasSession Jun 25, 2025
dc85cb9
Removed shimmer for a linear progress bar with a slight delay in its …
ThomasSession Jun 26, 2025
bf12061
Update CTA image
ThomasSession Jun 26, 2025
7c46c58
Merge pull request #1270 from session-foundation/dependabot/gradle/de…
ThomasSession Jun 26, 2025
04c98a8
Merge branch 'dev' into feature/character-limit
ThomasSession Jun 27, 2025
135b368
Proper calculation of text length
ThomasSession Jun 27, 2025
194ba16
Added support for upcoming animated CTAs
ThomasSession Jun 27, 2025
248f7e3
[Automated] Update translations from Crowdin
Aerilym Jun 27, 2025
9614aa9
typo
ThomasSession Jun 27, 2025
773aa0c
Renamed shimmer
ThomasSession Jun 27, 2025
2feb8d1
Merge pull request #1276 from session-foundation/feature/update-crowd…
ThomasSession Jun 27, 2025
3fdbe40
Merge branch 'dev' into feature/character-limit
ThomasSession Jun 27, 2025
bef8eba
Using new crowdin strings + new spacing amount
ThomasSession Jun 27, 2025
864e7f1
Update app/src/main/java/org/thoughtcrime/securesms/conversation/v2/C…
ThomasSession Jun 27, 2025
1ebe7f5
Cascading the MessageId change
ThomasSession Jun 27, 2025
edbf858
Fixed test plus PR feedback
ThomasSession Jun 27, 2025
ea40ebe
Merge pull request #1275 from session-foundation/feature/character-limit
ThomasSession Jun 27, 2025
16297b7
Merge branch 'dev' into merge/1.25.1_into_dev
ThomasSession Jun 27, 2025
d940323
Merge branch 'dev' into merge/1.25.1_into_dev
ThomasSession Jun 27, 2025
d1ccc88
Merge pull request #1280 from session-foundation/merge/1.25.1_into_dev
ThomasSession Jun 27, 2025
9fd8db3
SES-3950: better received and send timestamps in message info
ThomasSession Jun 30, 2025
68f76a8
SES-2359 reworking video thumbnail creation to make sure it happens p…
ThomasSession Jun 30, 2025
bebfcf1
SES-4024 - respect the 12/24h format from the system
ThomasSession Jun 30, 2025
8234927
Animated gradient vectors
ThomasSession Jul 1, 2025
9329286
Fix NPE on persistent logger (#1282)
SessionHero01 Jul 1, 2025
a07cca0
SES-2582 - notification for reactions
ThomasSession Jul 1, 2025
7648f1e
Bump androidx.appcompat:appcompat from 1.7.0 to 1.7.1 (#1267)
dependabot[bot] Jul 1, 2025
4d3e078
Better notification logic for messages and emoji reactions
ThomasSession Jul 1, 2025
ba3c22b
BEtter sql query and also checking notification content before resend…
ThomasSession Jul 2, 2025
ced7f41
using string for content check
ThomasSession Jul 2, 2025
fa5cb1e
using constant
ThomasSession Jul 2, 2025
1f6f018
Reusing logic for notification signature
ThomasSession Jul 2, 2025
d1c758d
Merge branch 'dev' into fix/backlog-grooming-june-2025
ThomasSession Jul 2, 2025
2e4bbee
Fixed tests
ThomasSession Jul 2, 2025
55514c3
Merge pull request #1287 from session-foundation/fix/backlog-grooming…
ThomasSession Jul 2, 2025
b28a48c
Merge branch 'dev' into release/1.25.2
SessionHero01 Jul 2, 2025
77cf7d2
Merge pull request #1288 from session-foundation/release/1.25.2
SessionHero01 Jul 2, 2025
043881c
[SES-4096] - Audio notes improvement (#1289)
SessionHero01 Jul 2, 2025
819f1a8
Added proper animations for CTA
ThomasSession Jul 2, 2025
cba2a6c
Merge branch 'dev' into feature/updatedCTAs
ThomasSession Jul 2, 2025
774e896
Tweak drone CI pipeline (#1290)
SessionHero01 Jul 2, 2025
f16f7f9
Merge branch 'dev' into feature/updatedCTAs
ThomasSession Jul 2, 2025
115d55d
Merge pull request #1291 from session-foundation/feature/updatedCTAs
ThomasSession Jul 2, 2025
8b5e8c7
Bump kotlinVersion from 2.1.10 to 2.2.0 (#1285)
dependabot[bot] Jul 2, 2025
541a3c0
Pin Pro CTA + updated shimmer
ThomasSession Jul 2, 2025
41892bb
Pin Pro CTA and logic
ThomasSession Jul 2, 2025
a5c3b91
Added compose dialogs to the homescreen and hooked the pin CTA there
ThomasSession Jul 2, 2025
3afcd7f
PR feedback
ThomasSession Jul 2, 2025
9f6b247
Merge branch 'dev' into feature/pro-pin
ThomasSession Jul 2, 2025
dfb8411
Merge pull request #1292 from session-foundation/feature/pro-pin
ThomasSession Jul 2, 2025
bcafe3e
[Automated] Update translations from Crowdin
ThomasSession Jul 2, 2025
741ee88
Merge pull request #1293 from session-foundation/feature/update-crowd…
ThomasSession Jul 2, 2025
267d85b
crowdin string and string logic for grandfathered users
ThomasSession Jul 2, 2025
eee17e0
Merge pull request #1294 from session-foundation/feature/pin-crowdin-…
ThomasSession Jul 2, 2025
a6b6375
version bump
ThomasSession Jul 3, 2025
1028a0a
Merge branch 'dev' into release/1.26.0
ThomasSession Jul 3, 2025
dcf25b5
Reverting change for now while we work on a solution
ThomasSession Jul 4, 2025
d01201c
Fix audio duration not set if the player doesn't give us duration (#1…
SessionHero01 Jul 7, 2025
5309041
Using the inputbar in the media send instead of a separate element
ThomasSession Jul 7, 2025
a7dbfe0
Use reaction date received and thread last sent to calculate unseen r…
SessionHero01 Jul 7, 2025
2419a08
Clean up plus porper CTA image for pins
ThomasSession Jul 7, 2025
c0a13d8
Fixed padding for files too close to 10mb
ThomasSession Jul 7, 2025
052025e
Passing in the inputbar data from convo to media send
ThomasSession Jul 8, 2025
9dfc722
Cleaned up logic
ThomasSession Jul 8, 2025
eaff3da
Started pulling out logic from convv2 so it can be reused
ThomasSession Jul 8, 2025
4a4932d
Sharing dialog logic
ThomasSession Jul 8, 2025
4d3d0ea
Formatted char left string
ThomasSession Jul 8, 2025
71975d4
Merge pull request #1300 from session-foundation/fix-reaction
ThomasSession Jul 8, 2025
97dd3db
Only notify of a "start typing" if the text isn't empty
ThomasSession Jul 8, 2025
2db8590
tweak
ThomasSession Jul 8, 2025
aac2797
Proper height visible for long press context menu
ThomasSession Jul 8, 2025
85c9e24
Merge branch 'release/1.26.0' into fix/char-limit-media
ThomasSession Jul 8, 2025
5497511
Increase memory limit on drone CI (#1303)
SessionHero01 Jul 8, 2025
76873f0
Fix up log exporting (#1302)
SessionHero01 Jul 8, 2025
d6faee4
Merge pull request #1304 from session-foundation/fix/char-limit-media
ThomasSession Jul 8, 2025
59683a8
Making sure the inputbar styles itself with a bottom part
ThomasSession Jul 8, 2025
d869bba
Fixing insets
ThomasSession Jul 8, 2025
534f5de
More inset fix
ThomasSession Jul 8, 2025
ae025bc
Latest crowdin strings
ThomasSession Jul 8, 2025
c9a34de
Adjust gradle memory (#1307)
SessionHero01 Jul 9, 2025
36b09f8
Increase gradle memory
SessionHero01 Jul 9, 2025
1f62d44
Tweak worker count and kotlin jvmargs
SessionHero01 Jul 9, 2025
362ba12
Tweak worker count and kotlin jvmargs
SessionHero01 Jul 9, 2025
da533a1
Do not update teh recipient class for no reason. Also fixes SES-4182 …
ThomasSession Jul 9, 2025
bc1107f
SES-4181 - Preserve message body when adding a photo
ThomasSession Jul 9, 2025
44e0c9c
Fix reaction notification issues on restoring (#1308)
SessionHero01 Jul 9, 2025
265aec6
Merge pull request #1309 from session-foundation/fix/char-limit-input…
ThomasSession Jul 9, 2025
4031cbd
SES-SES-4180 - Make sure we preserve the typed text before going out …
ThomasSession Jul 11, 2025
0d84a29
Merge pull request #1311 from session-foundation/fix/1.26.0-issues
ThomasSession Jul 11, 2025
dbab8c2
Truncate at 10K pre pro launch
ThomasSession Jul 14, 2025
54c24cf
New feedback survey url
ThomasSession Jul 14, 2025
4f982f1
Fixed CTA icon color
ThomasSession Jul 14, 2025
97378e9
Reverting feedback url
ThomasSession Jul 14, 2025
bab253c
[SES-4285] - Simplify expiriation logic (#1312)
SessionHero01 Jul 15, 2025
dccb9bb
[SES-4143] - Fix incorrect copy used on home screen (#1323)
SessionHero01 Jul 15, 2025
0be4b5c
Make sure migration is only done outside ThreadDatabase's constructor…
SessionHero01 Jul 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
image: docker_base + 'android',
pull: 'always',
environment: { ANDROID_HOME: '/usr/lib/android-sdk' },
mem_limit: "8g",
commands: [
'apt-get update --allow-releaseinfo-change',
'apt-get install -y ninja-build openjdk-21-jdk',
Expand Down Expand Up @@ -70,14 +71,18 @@ local ci_dep_mirror(want_mirror) = (if want_mirror then ' -DLOCAL_MIRROR=https:/
type: 'docker',
name: 'Debug APK Build',
platform: { arch: 'amd64' },
trigger: { event: { exclude: [ 'pull_request' ] } },
trigger: {
event: ['push'],
branch: ['master', 'dev', 'release/*']
},
steps: [
version_info,
clone_submodules,
{
name: 'Build and upload',
image: docker_base + 'android',
pull: 'always',
mem_limit: "8g",
environment: { SSH_KEY: { from_secret: 'SSH_KEY' }, ANDROID_HOME: '/usr/lib/android-sdk' },
commands: [
'apt-get update --allow-releaseinfo-change',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
submodules: 'recursive'
- name: Set up JDK 21
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
Expand Down
14 changes: 8 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ configurations.configureEach {
exclude(module = "commons-logging")
}

val canonicalVersionCode = 414
val canonicalVersionName = "1.25.2"
val canonicalVersionCode = 415
val canonicalVersionName = "1.26.0"

val postFixSize = 10
val abiPostFix = mapOf(
Expand All @@ -44,6 +44,12 @@ val getGitHash = providers
.asText
.map { it.trim() }

kotlin {
compilerOptions {
jvmToolchain(17)
}
}

android {
namespace = "network.loki.messenger"
useLibrary("org.apache.http.legacy")
Expand All @@ -53,10 +59,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}

packaging {
resources.excludes += listOf(
"LICENSE.txt", "LICENSE", "NOTICE", "asm-license.txt",
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED"/>
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Expand Down Expand Up @@ -279,7 +280,6 @@
<activity
android:name="org.thoughtcrime.securesms.MediaPreviewActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:screenOrientation="portrait"
android:theme="@style/Theme.Session.DayNight.NoActionBar"
android:launchMode="singleTask"
android:windowSoftInputMode="stateHidden" />
Expand Down Expand Up @@ -382,7 +382,7 @@
android:exported="false" />

<provider
android:name="org.thoughtcrime.securesms.providers.PartProvider"
android:name="org.thoughtcrime.securesms.providers.PartAndBlobProvider"
android:authorities="network.loki.provider.securesms"
android:exported="false"
android:grantUriPermissions="true" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import org.session.libsession.messaging.jobs.Job
import org.session.libsession.messaging.jobs.MessageSendJob
import org.session.libsession.messaging.messages.ExpirationConfiguration
import org.session.libsession.messaging.messages.Message
import org.session.libsession.messaging.messages.control.ConfigurationMessage
import org.session.libsession.messaging.messages.control.GroupUpdated
import org.session.libsession.messaging.messages.control.MessageRequestResponse
import org.session.libsession.messaging.messages.visible.Attachment
Expand All @@ -37,6 +36,7 @@ import org.session.libsignal.messages.SignalServiceGroup
import org.session.libsignal.utilities.AccountId
import org.thoughtcrime.securesms.database.model.MessageId
import org.thoughtcrime.securesms.database.model.MessageRecord
import org.thoughtcrime.securesms.database.model.ReactionRecord
import network.loki.messenger.libsession_util.util.Contact as LibSessionContact
import network.loki.messenger.libsession_util.util.GroupMember as LibSessionGroupMember

Expand Down Expand Up @@ -116,7 +116,7 @@ interface StorageProtocol {
fun removeReceivedMessageTimestamps(timestamps: Set<Long>)
fun getAttachmentsForMessage(mmsMessageId: Long): List<DatabaseAttachment>
fun getMessageBy(timestamp: Long, author: String): MessageRecord?
fun updateSentTimestamp(messageId: MessageId, openGroupSentTimestamp: Long, threadId: Long)
fun updateSentTimestamp(messageId: MessageId, newTimestamp: Long)
fun markAsResyncing(messageId: MessageId)
fun markAsSyncing(messageId: MessageId)
fun markAsSending(messageId: MessageId)
Expand Down Expand Up @@ -159,16 +159,17 @@ interface StorageProtocol {
// Closed Groups
fun getMembers(groupPublicKey: String): List<LibSessionGroupMember>
fun getClosedGroupDisplayInfo(groupAccountId: String): GroupDisplayInfo?
fun insertGroupInfoChange(message: GroupUpdated, closedGroup: AccountId): Long?
fun insertGroupInfoLeaving(closedGroup: AccountId): Long?
fun insertGroupInfoErrorQuit(closedGroup: AccountId): Long?
fun insertGroupInfoChange(message: GroupUpdated, closedGroup: AccountId)
fun insertGroupInfoLeaving(closedGroup: AccountId)
fun insertGroupInfoErrorQuit(closedGroup: AccountId)
fun insertGroupInviteControlMessage(
sentTimestamp: Long,
senderPublicKey: String,
senderName: String?,
closedGroup: AccountId,
groupName: String
): Long?
)

fun updateGroupInfoChange(messageId: Long, newType: UpdateMessageData.Kind)
fun deleteGroupInfoMessages(groupId: AccountId, kind: Class<out UpdateMessageData.Kind>)

Expand All @@ -190,6 +191,7 @@ interface StorageProtocol {
fun trimThread(threadID: Long, threadLimit: Int)
fun trimThreadBefore(threadID: Long, timestamp: Long)
fun getMessageCount(threadID: Long): Long
fun getTotalPinned(): Int
fun setPinned(threadID: Long, isPinned: Boolean)
fun isPinned(threadID: Long): Boolean
fun deleteConversation(threadID: Long)
Expand All @@ -208,7 +210,6 @@ interface StorageProtocol {
fun getRecipientSettings(address: Address): RecipientSettings?
fun syncLibSessionContacts(contacts: List<LibSessionContact>, timestamp: Long?)
fun hasAutoDownloadFlagBeenSet(recipient: Recipient): Boolean
fun addContacts(contacts: List<ConfigurationMessage.Contact>)
fun shouldAutoDownloadAttachments(recipient: Recipient): Boolean
fun setAutoDownloadAttachments(recipient: Recipient, shouldAutoDownloadAttachments: Boolean)

Expand Down Expand Up @@ -258,17 +259,21 @@ interface StorageProtocol {
/**
* Add reaction to a specific message. This is preferable to the timestamp lookup.
*/
fun addReaction(messageId: MessageId, reaction: Reaction, messageSender: String, notifyUnread: Boolean)
fun addReaction(messageId: MessageId, reaction: Reaction, messageSender: String)

/**
* Add reactions into the database. If [replaceAll] is true,
* it will remove all existing reactions that belongs to the same message(s).
*/
fun addReactions(reactions: Map<MessageId, List<ReactionRecord>>, replaceAll: Boolean, notifyUnread: Boolean)
fun removeReaction(emoji: String, messageTimestamp: Long, threadId: Long, author: String, notifyUnread: Boolean)
fun updateReactionIfNeeded(message: Message, sender: String, openGroupSentTimestamp: Long)
fun deleteReactions(messageId: MessageId)
fun deleteReactions(messageIds: List<Long>, mms: Boolean)
fun setBlocked(recipients: Iterable<Recipient>, isBlocked: Boolean, fromConfigUpdate: Boolean = false)
fun setRecipientHash(recipient: Recipient, recipientHash: String?)
fun blockedContacts(): List<Recipient>
fun getExpirationConfiguration(threadId: Long): ExpirationConfiguration?
fun setExpirationConfiguration(config: ExpirationConfiguration)
fun getExpiringMessages(messageIds: List<Long> = emptyList()): List<Pair<Long, Long>>
fun updateDisappearingState(
messageSender: String,
threadID: Long,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.session.libsession.utilities.Device
import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsession.utilities.Toaster
import org.session.libsession.utilities.UsernameUtils
import org.thoughtcrime.securesms.pro.ProStatusManager

class MessagingModuleConfiguration(
val context: Context,
Expand All @@ -25,7 +26,8 @@ class MessagingModuleConfiguration(
val clock: SnodeClock,
val preferences: TextSecurePreferences,
val deprecationManager: LegacyGroupDeprecationManager,
val usernameUtils: UsernameUtils
val usernameUtils: UsernameUtils,
val proStatusManager: ProStatusManager
) {

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,34 @@ import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.coroutineScope
import network.loki.messenger.libsession_util.ConfigBase
import network.loki.messenger.libsession_util.util.BlindKeyAPI
import org.session.libsession.messaging.MessagingModuleConfiguration
import org.session.libsession.messaging.messages.Destination
import org.session.libsession.messaging.messages.Message
import org.session.libsession.messaging.messages.Message.Companion.senderOrSync
import org.session.libsession.messaging.messages.control.CallMessage
import org.session.libsession.messaging.messages.control.LegacyGroupControlMessage
import org.session.libsession.messaging.messages.control.ConfigurationMessage
import org.session.libsession.messaging.messages.control.DataExtractionNotification
import org.session.libsession.messaging.messages.control.ExpirationTimerUpdate
import org.session.libsession.messaging.messages.control.MessageRequestResponse
import org.session.libsession.messaging.messages.control.ReadReceipt
import org.session.libsession.messaging.messages.control.SharedConfigurationMessage
import org.session.libsession.messaging.messages.control.TypingIndicator
import org.session.libsession.messaging.messages.control.UnsendRequest
import org.session.libsession.messaging.messages.visible.ParsedMessage
import org.session.libsession.messaging.messages.visible.VisibleMessage
import org.session.libsession.messaging.open_groups.OpenGroupApi
import org.session.libsession.messaging.sending_receiving.MessageReceiver
import org.session.libsession.messaging.sending_receiving.VisibleMessageHandlerContext
import org.session.libsession.messaging.sending_receiving.constructReactionRecords
import org.session.libsession.messaging.sending_receiving.handle
import org.session.libsession.messaging.sending_receiving.handleOpenGroupReactions
import org.session.libsession.messaging.sending_receiving.handleUnsendRequest
import org.session.libsession.messaging.sending_receiving.handleVisibleMessage
import org.session.libsession.messaging.utilities.Data
import org.session.libsession.utilities.SSKEnvironment
import org.session.libsession.utilities.UserConfigType
import org.session.libsignal.protos.UtilProtos
import org.session.libsignal.utilities.AccountId
import org.session.libsignal.utilities.Hex
import org.session.libsignal.utilities.IdPrefix
import org.session.libsignal.utilities.Log
import org.thoughtcrime.securesms.database.model.MessageId
import org.thoughtcrime.securesms.database.model.ReactionRecord
import kotlin.math.max

data class MessageReceiveParameters(
Expand Down Expand Up @@ -83,12 +79,9 @@ class BatchMessageReceiveJob(
if (message is VisibleMessage) return true
else { // message is control message otherwise
return when(message) {
is SharedConfigurationMessage -> false
is LegacyGroupControlMessage -> false // message.kind is ClosedGroupControlMessage.Kind.New && !message.isSenderSelf
is DataExtractionNotification -> false
is MessageRequestResponse -> false
is ExpirationTimerUpdate -> false
is ConfigurationMessage -> false
is TypingIndicator -> false
is UnsendRequest -> false
is ReadReceipt -> false
Expand Down Expand Up @@ -175,45 +168,51 @@ class BatchMessageReceiveJob(
}

// iterate over threads and persist them (persistence is the longest constant in the batch process operation)
fun processMessages(threadId: Long, messages: List<ParsedMessage>) {
suspend fun processMessages(threadId: Long, messages: List<ParsedMessage>) {
// The LinkedHashMap should preserve insertion order
val messageIds = linkedMapOf<MessageId, Pair<Boolean, Boolean>>()
val myLastSeen = storage.getLastSeen(threadId)
var newLastSeen = myLastSeen.takeUnless { it == -1L } ?: 0
var updatedLastSeen = myLastSeen.takeUnless { it == -1L } ?: 0
val handlerContext = VisibleMessageHandlerContext(
module = MessagingModuleConfiguration.shared,
threadId = threadId,
openGroupID = openGroupID,
)

val communityReactions = mutableMapOf<MessageId, MutableList<ReactionRecord>>()

messages.forEach { (parameters, message, proto) ->
try {
when (message) {
is VisibleMessage -> {
val isUserBlindedSender =
message.sender == serverPublicKey?.let {
BlindKeyAPI.blind15KeyPairOrNull(
ed25519SecretKey = storage.getUserED25519KeyPair()!!
.secretKey.data,
serverPubKey = Hex.fromStringCondensed(it),
)
}?.let {
AccountId(IdPrefix.BLINDED, it.pubKey.data).hexString
}
message.sender == handlerContext.userBlindedKey

if (message.sender == localUserPublicKey || isUserBlindedSender) {
// use sent timestamp here since that is technically the last one we have
newLastSeen = max(newLastSeen, message.sentTimestamp!!)
updatedLastSeen = max(updatedLastSeen, message.sentTimestamp!!)
}
val messageId = MessageReceiver.handleVisibleMessage(message, proto, openGroupID,
threadId,
val messageId = MessageReceiver.handleVisibleMessage(
message = message,
proto = proto,
context = handlerContext,
runThreadUpdate = false,
runProfileUpdate = true)
runProfileUpdate = true
)

if (messageId != null && message.reaction == null) {
messageIds[messageId] = Pair(
(message.sender == localUserPublicKey || isUserBlindedSender),
message.hasMention
)
}

parameters.openGroupMessageServerID?.let {
MessageReceiver.handleOpenGroupReactions(
threadId,
it,
parameters.reactions
constructReactionRecords(
openGroupMessageServerID = it,
context = handlerContext,
reactions = parameters.reactions,
out = communityReactions
)
}
}
Expand Down Expand Up @@ -248,13 +247,20 @@ class BatchMessageReceiveJob(
// increment unreads, notify, and update thread
// last seen will be the current last seen if not changed (re-computes the read counts for thread record)
// might have been updated from a different thread at this point
val currentLastSeen = storage.getLastSeen(threadId).let { if (it == -1L) 0 else it }
newLastSeen = max(newLastSeen, currentLastSeen)
if (newLastSeen > 0 || currentLastSeen == 0L) {
storage.markConversationAsRead(threadId, newLastSeen, force = true)
val storedLastSeen = storage.getLastSeen(threadId).let { if (it == -1L) 0 else it }
updatedLastSeen = max(updatedLastSeen, storedLastSeen)
// Only call markConversationAsRead() when lastSeen actually advanced (we sent a message).
// For incoming-only batches (like reactions), skip this to preserve REACTIONS_UNREAD flags
// so the notification system can detect them. Thread updates happen separately below.
if (updatedLastSeen > 0 || storedLastSeen == 0L) {
storage.markConversationAsRead(threadId, updatedLastSeen, force = true)
}
storage.updateThread(threadId, true)
SSKEnvironment.shared.notificationManager.updateNotification(context, threadId)

if (communityReactions.isNotEmpty()) {
storage.addReactions(communityReactions, replaceAll = true, notifyUnread = false)
}
}

coroutineScope {
Expand Down
Loading