Skip to content
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

New version 2.4.5 #1100

Merged
merged 66 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
e8947c5
TW#985 Change App ID for iOS
hoangdat Nov 28, 2023
d807872
TW#985 Change App ID for macOS
hoangdat Nov 28, 2023
7e6ffd8
TW#985 Change App ID for linux
hoangdat Nov 28, 2023
2fd4cc7
TW#985 Change App ID for Window
hoangdat Nov 28, 2023
0f8c9e3
TW#985 Change App ID for Android
hoangdat Nov 28, 2023
5ca04e3
TW#985 Change App ID for iOS Share extension
hoangdat Nov 29, 2023
3b5f203
TW#985 Change google service for FCM
hoangdat Nov 29, 2023
e4f50fc
TW#985 Update app Id for Windows
hoangdat Nov 29, 2023
00467f5
TW#985 Build and run iOS app in local
hoangdat Nov 29, 2023
7077987
TW#985 Change the provision profile for iOS releasing
hoangdat Nov 29, 2023
1dcab59
TW#985 Bump version to v2.4.3
hoangdat Nov 30, 2023
095aaf1
TW-916: improve size image preview link
Nov 27, 2023
f64e144
TW-991: creating DM with no encryption by default, hiding create chat…
Dec 1, 2023
e570256
TW-1012: update the sdk to send loading text message
sherlockvn Dec 1, 2023
8e3d163
TW-1012: add send_media_with_caption interactor
sherlockvn Dec 1, 2023
0b2e4e5
TW-1012: refactor input bar
sherlockvn Dec 1, 2023
0190fc7
TW-1012: add sendFakeMessage method to room
sherlockvn Dec 1, 2023
e5c1eb8
TW-1012: refactor image_viewer to use when preview image with caption
sherlockvn Dec 1, 2023
4fd4999
TW-1012: refactor send file dialog with new design
sherlockvn Dec 1, 2023
91e4668
TW-1012: refactor draft chat to have new send image dialog
sherlockvn Dec 4, 2023
9c565b1
TW-989: update homeserver endpoint to have server search
sherlockvn Nov 29, 2023
8a76c72
TW-989: update dio client to avoid cast type from response<dynamic> t…
sherlockvn Nov 29, 2023
e1deb98
TW-989: update server search API and its request and response
sherlockvn Nov 29, 2023
0c0b4f7
TW-989: add server search datasource and its implementation
sherlockvn Nov 29, 2023
c94fa35
TW-989: add server search repository and its implementation
sherlockvn Nov 29, 2023
e443ec0
TW-989: add server search interactor and its state
sherlockvn Nov 29, 2023
1ff1813
TW-989: add server search components to DI
sherlockvn Nov 29, 2023
5d87431
TW-989: refactor search debouncer for reuse
sherlockvn Nov 29, 2023
9612446
TW-989: add server search to global search
sherlockvn Nov 29, 2023
5c778c8
TW-989: add server search to global search UI
sherlockvn Nov 29, 2023
e6c4954
Use draft release for the app
Dec 6, 2023
3ec1d45
TW-1034: Reply message has content preview link by preview link (#1088)
nqhhdev Dec 7, 2023
cd84c67
TW-1091: Improve jump to message
nqhhdev Dec 6, 2023
db93b65
TW-898: move logic of download+preview file from chat controller to m…
sherlockvn Dec 6, 2023
77ee18e
TW-898: move private class to another file
sherlockvn Dec 6, 2023
f783bca
TW-898: move utils method to extension
sherlockvn Dec 6, 2023
525696a
TW-898: move child of message to another class so that it's easier to…
sherlockvn Dec 6, 2023
9788d07
TW-898: make onSwipe is optional and create SwipeableMessage class
sherlockvn Dec 6, 2023
82f30eb
TW-898: remove ChatController in children of message widget
sherlockvn Dec 6, 2023
d014a98
TW-898: add ADR for refactor message class
sherlockvn Dec 6, 2023
626d8be
TW-1049 Save session to keychain
drminh2807 Nov 30, 2023
d6cb617
TW-1049 Create NSE target
drminh2807 Nov 30, 2023
dceb299
TW-1049 Copy element-x files
drminh2807 Nov 30, 2023
9a38771
TW-1049 Support localizations
drminh2807 Nov 30, 2023
3333834
TW-1049 Support multi account
drminh2807 Nov 30, 2023
afc5e73
TW-1049 Write ADR
drminh2807 Dec 6, 2023
59ae6f2
TW-1049 Add support new app id
drminh2807 Dec 8, 2023
142aae6
hotfix: Load more history
drminh2807 Dec 8, 2023
49ff4bc
Update size for input bar in chat
nqhhdev Dec 7, 2023
667b73c
Update style and size for appbar in chat
nqhhdev Dec 7, 2023
682260f
Update style and size for chat list
nqhhdev Dec 7, 2023
81f5abe
Update style and size for input bar in chat
nqhhdev Dec 7, 2023
bc803f9
Update display reply and input bar
nqhhdev Dec 7, 2023
d45b999
Update pinned events
nqhhdev Dec 7, 2023
3474eaf
Update style for draft chat and background
nqhhdev Dec 8, 2023
1cfc600
Update height for all appbar
nqhhdev Dec 8, 2023
80ffbb9
hot-fix: show context menu in web
sherlockvn Dec 8, 2023
014be33
hot-fix: remove the wrong condition make the app throw at runtime
sherlockvn Dec 8, 2023
9a63716
TW-815 Do not show any message in history before you join the room
drminh2807 Dec 11, 2023
d9f28c3
TW-858: Create `LookupMatchContactInteractor` and implement in domain…
nqhhdev Dec 5, 2023
8746c68
TW-858: Implement `LookupMatchContact` in data layer
nqhhdev Dec 5, 2023
ec5177f
TW-858: Create profile info shared
nqhhdev Dec 5, 2023
14d352f
TW-858: Implement and update UI for chat profile info
nqhhdev Dec 5, 2023
4447e25
TW-1011: Add toolbarHeight standard for app config and apply for all
nqhhdev Dec 11, 2023
d96fe72
TW-1011: Add StreamSubscription for listen lookupContact
nqhhdev Dec 11, 2023
4f39309
Bump version to v2.4.5
hoangdat Dec 11, 2023
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
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## [2.4.5+2330] - 2023-12-11

### Added

- Create unencrypted Direct Message
- Preview image before sending
- Search for unencrypted message
- Add NSE to get plain notification
- profile info

### Changed

- new app id
- Jump to message
- Refactor Message widget
- Update correct style for app

### Fixed

- thumbnail image in preview link

## [2.4.2+2330] - 2023-11-28

### Added
Expand Down Expand Up @@ -2070,6 +2091,8 @@ interesting devices. If you have one, I would very like to see some screenshots
This CHANGELOG.md was generated with [**Changelog for
Dart**](https://pub.dartlang.org/packages/changelog)

[2.4.5+2330]: https://github.com/linagora/twake-on-matrix/releases/tag/2.4.5+2330

[2.4.2+2330]: https://github.com/linagora/twake-on-matrix/releases/tag/2.4.2

[2.4.1+2330]: https://github.com/linagora/twake-on-matrix/releases/tag/2.4.1
Expand Down
2 changes: 1 addition & 1 deletion PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ A typical push notification could look like this:
},
"devices": [
{
"app_id": "com.twake.twake",
"app_id": "app.twake.android.chat",
"pushkey": "V2h5IG9uIGVhcnRoIGRpZCB5b3UgZGVjb2RlIHRoaXM/",
"pushkey_ts": 12345678,
"data": {},
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}

defaultConfig {
applicationId "com.twake.twake"
applicationId "app.twake.android.chat"
minSdkVersion 23
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
Expand Down
50 changes: 50 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,45 @@
"storage_bucket": "twake-195010.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:492265884073:android:da793d03162cb7db6b5cb8",
"android_client_info": {
"package_name": "app.twake.android.chat"
}
},
"oauth_client": [
{
"client_id": "492265884073-g537tkljd8ilrg4c63t0s86fgk97mol7.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC7c2xkmUpHo9i-O0bsm2BRHnZD1LPi-sU"
},
{
"current_key": "AIzaSyAX6d-jWjhiYiP2RsRdWTrpKt9yCW0M5Zc"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "492265884073-g537tkljd8ilrg4c63t0s86fgk97mol7.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "492265884073-758idkadb1l2kh348fk84rn13su5rks6.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.linagora.twake"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:492265884073:android:fba0d50aace57d8d",
Expand All @@ -14,6 +53,14 @@
}
},
"oauth_client": [
{
"client_id": "492265884073-4s9mhnk9281tpitd9s9v35rc65iace3l.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.twake.twake",
"certificate_hash": "48feee1175a3f98d1a08db10c70fe631eac1dfd3"
}
},
{
"client_id": "492265884073-e89325dclv982tp2tbjpmi57l95r1r4o.apps.googleusercontent.com",
"client_type": 1,
Expand All @@ -28,6 +75,9 @@
}
],
"api_key": [
{
"current_key": "AIzaSyC7c2xkmUpHo9i-O0bsm2BRHnZD1LPi-sU"
},
{
"current_key": "AIzaSyAX6d-jWjhiYiP2RsRdWTrpKt9yCW0M5Zc"
}
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.twake.twake">
package="app.twake.android.chat">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.twake.twake" android:installLocation="auto">
package="app.twake.android.chat" android:installLocation="auto">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
Expand Down Expand Up @@ -141,7 +141,7 @@
android:value="2" />
<provider
android:name="com.superlist.super_native_extensions.DataProvider"
android:authorities="com.twake.twake.SuperClipboardDataProvider"
android:authorities="app.twake.android.chat.SuperClipboardDataProvider"
android:exported="true"
android:grantUriPermissions="true" >
</provider>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.twake.twake
package app.twake.android.chat

import com.famedly.fcm_shared_isolate.FcmSharedIsolateService

import com.twake.twake.MainActivity
import app.twake.android.chat.MainActivity

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.twake.twake
package app.twake.android.chat

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.twake.twake
package app.twake.android.chat

import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.dart.DartExecutor
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.twake.twake">
package="app.twake.android.chat">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
2 changes: 1 addition & 1 deletion android/fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
json_key_file("keys.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.twake.twake")
package_name("app.twake.android.chat")
3 changes: 2 additions & 1 deletion android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ platform :android do
lane :deploy_internal_test do
track = "internal"
upload_to_play_store(track: track,
aab: '../build/app/outputs/bundle/release/app-release.aab')
aab: '../build/app/outputs/bundle/release/app-release.aab',
release_status: "draft")
end

lane :deploy_candidate do
Expand Down
4 changes: 2 additions & 2 deletions appimage/AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ version: 1
AppDir:
path: ./AppDir
app_info:
id: com.linagora.linux.twake
name: Twake
id: app.twake.linux.chat
name: Twake Chat
icon: twake
version: latest
exec: fluffychat
Expand Down
10 changes: 7 additions & 3 deletions assets/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2606,8 +2606,6 @@
"@inactive": {},
"newGroupChat": "New Group Chat",
"@newGroupChat": {},
"getHelp": "Get help",
"@getHelp": {},
"twakeUsers": "Twake users",
"@twakeUsers": {},
"expand": "Expand",
Expand Down Expand Up @@ -2952,5 +2950,11 @@
"placeholders_order": [],
"placeholders": {}
},
"settingsLanguageDescription": "Set the language you use on Twake Chat"
"settingsLanguageDescription": "Set the language you use on Twake Chat",
"sendImages": "{count, plural, =1{Send 1 image} other{Send {count} images}}",
"enterCaption": "Enter a caption",
"failToSend": "Failed to send, please try again",
"showLess": "Show Less",
"showMore": "Show More",
"sharedMediaAndFiles": "Shared media and files"
}
2 changes: 0 additions & 2 deletions assets/l10n/intl_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2683,8 +2683,6 @@
},
"invite": "Inviter",
"@invite": {},
"getHelp": "Obtenir de l'aide",
"@getHelp": {},
"errorPageTitle": "Il y a un problème",
"@errorPageTitle": {},
"forwardTo": "Transmettre à...",
Expand Down
2 changes: 0 additions & 2 deletions assets/l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2566,8 +2566,6 @@
"@inactive": {},
"newGroupChat": "Новый групповой чат",
"@newGroupChat": {},
"getHelp": "Помощь",
"@getHelp": {},
"expand": "Развернуть",
"@expand": {},
"shrink": "Свернуть",
Expand Down
2 changes: 0 additions & 2 deletions assets/l10n/intl_vi.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2733,8 +2733,6 @@
"type": "text",
"placeholders": {}
},
"getHelp": "Trợ giúp",
"@getHelp": {},
"pleaseChooseAUsername": "Vui lòng chọn tên đăng nhập",
"@pleaseChooseAUsername": {
"type": "text",
Expand Down
73 changes: 73 additions & 0 deletions docs/adr/0012-improve-ios-notification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 12. Improve iOS notification

Date: 2023-12-06

## Status

Accepted

## Context
The motivation behind this decision is the inability to execute Dart code for decrypting notifications when the iOS app is running in the background. This limitation is different from Android or Web, where Dart code can easily run in such scenarios.

## Decision
We have decided to make the following changes to address the mentioned issue:

1. **Notification Service Extension (NSE):**
- Utilize the [Notification Service Extension](https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications) provided by Apple to modify the content of notifications.

2. **MatrixRustSDK Integration:**
- Integrate MatrixRustSDK to decrypt messages within the Notification Service Extension. The MatrixRustSDK version and other dependencies should be synchronized with Element X to avoid unexpected errors. Reference the synchronization from [Element X project.yml](https://github.com/vector-im/element-x-ios/blob/main/project.yml#L46).

3. **Automated Script for Source Code Copy:**
- Develop a script written in Node.js to automate the process of copying the entire source code related to the Notification Service Extension from Element X, a known version. Detail at [scripts/copy-nse/README.MD](../../scripts/copy-nse/README.MD)

4. **Dart Code Adjustment:**
- Modify Dart code to ensure compatibility with the Notification Service Extension from Element X.

5. **Debugging Patch with AppDelegate:**
- Add the patch `scripts/patchs/ios-extension-debug.patch` to address debugging issues. This patch removes FlutterAppDelegate and suggests using AppDelegate instead for smoother debugging during Notification Service Extension development.

6. **Add pusher_notification_client_identifier to Default Payload:**
- Extend the default notification payload by adding the `pusher_notification_client_identifier` field. This supports multi-account scenarios, where each notification will have a `client_identifier` to identify the user for decryption. For now it is SHA256 of userId

7. **Keychain Access Groups:**
- Utilize `keychain-access-groups` to enable data exchange between the Notification Service Extension (NSE) and the main app by using a shared Keychain Access Group. This ensures security and safe data transmission (See details at [link](https://developer.apple.com/documentation/security/keychain_services/keychain_items/sharing_access_to_keychain_items_among_a_collection_of_apps/)).

8. **INSendMessageIntent:**
- Use `INSendMessageIntent` to support displaying profile pictures in notifications. Instead of using regular notifications, integrating `INSendMessageIntent` ensures that the sender's image is displayed correctly in the notification (See details at [link](https://stackoverflow.com/questions/68198452/ios-15-communication-notification-picture-not-shown)).

9. **iOS Version Support Below 16:**
- Communicate that Element X's Notification Service Extension supports iOS 16 and above. Therefore, Twake NSE will also have a similar requirement. Users with iOS versions below 16 can still install Twake, but they won't be able to decrypt notifications.

## Consequences
Implementing these decisions has the following consequences:

1. **Notification Discrepancy:**
- Notifications will behave differently in the background and foreground because they are handled by Swift in the background and Dart in the foreground.

2. **Integration Challenges:**
- There might be challenges in seamlessly integrating Notification Service Extension with MatrixRustSDK and adjusting it to fit the current source code. The MatrixRustSDK version and dependencies should be synchronized with Element X to avoid unexpected errors.

3. **Automated Source Code Copy:**
- Introducing an automated Node.js script streamlines the process of copying the source code from Element X, enhancing efficiency and reducing manual errors during this task.

4. **Message Decryption Research:**
- Further research is required to successfully decrypt encrypted messages. This introduces a potential risk as it may involve understanding specific nuances when integrating MatrixRustSDK with Notification Service Extension.

5. **Maintenance Overhead:**
- Copying source code from Element X may create maintenance overhead, as any updates or changes in Element X's source code need manual integration and synchronization.

6. **Improved Debugging:**
- The debugging patch aims to optimize the debugging experience by addressing issues related to FlutterAppDelegate in the context of Notification Service Extension.

7. **Multi-Account Support:**
- Multi-account support is achieved by adding `pusher_notification_client_identifier` to the default notification payload.

8. **Security with Keychain Access Groups:**
- Ensures secure data transmission between Notification Service Extension and the main app using Keychain Access Groups.

9. **Profile Picture Display Enhancement:**
- The use of `INSendMessageIntent` enhances the user experience by ensuring the correct display of sender profile pictures in notifications.

10. **iOS 16 Requirement:**
- Communicates that Element X's Notification Service Extension requires iOS 16 or later, and Twake NSE has a similar requirement. Users below iOS 16 can install Twake but won't decrypt notifications.
23 changes: 23 additions & 0 deletions docs/adr/0012-refactor-message-widget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 1. refactor message widget

Date: 2023-06-12

## Status

Accepted

## Context

The Message widget requires refactoring as it currently spans approximately 1000 lines of code, making it challenging to read due to Dart formatting issues and its reliance on a large controller. This widget is intended for reuse in various contexts, such as threads and pinned messages.

## Decision

- Eliminate the dependency on the chat controller entirely in the Message widget.
- Optimize optional parameters, aiming for minimal usage and preferring child classes when appropriate.
- If the file exceeds 300 lines of code, create a child widget and relocate it to a separate file.
- For complex logic, introduce mixins or stateful widgets.
- Transfer utility methods to extensions or other classes to facilitate reuse.

## Consequences

The Message class is now under 300 lines of code and no longer relies on the controller. Child widgets have been moved to separate files for improved reusability.
Loading
Loading