Skip to content

Commit

Permalink
Merge branch 'main' into voip/livekit-group-call
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Oct 23, 2023
2 parents 6cbb60c + 8c638a7 commit cf6b603
Show file tree
Hide file tree
Showing 31 changed files with 685 additions and 202 deletions.
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 🐛 Bug Report
description: Report a bug to the product team
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! This will help us to improve the product :)
- type: checkboxes
attributes:
label: Checklist
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I could not find a solution in the documentation, the existing issues or discussions.
required: true
- label: I already asked for help in the chat
- type: dropdown
attributes:
label: In which Project did the bug appear?
multiple: true
options:
- Famedly App
- Pharmacy Portal
- Flutter Admin Interface
- Other
- type: input
attributes:
label: If you selected \"Other\" as Project, please enter in which project the bug occurred.
- type: dropdown
attributes:
label: On which platform did the bug appear?
multiple: true
options:
- Android
- iOS
- Chrome
- Safari
- Firefox
- Edge
validations:
required: true
- type: input
attributes:
label: SDK Version
description: Which version of the SDK (this Repo) are you using?
- type: textarea
attributes:
label: Describe the problem caused by this bug
description: |
A clear and concise description of the problem you have and what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this step...
1. With this device...
1. Run '...'
1. See error...
validations:
required: false
- type: textarea
attributes:
label: Screenshots or Logs
description: If applicable, add screenshots or Logs to help explain your problem.
- type: textarea
attributes:
label: Security related
description: If there is something related to security, please add it here
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/epic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 🥸 [Product only] Create epic
description: "Creates a new epic which is used to build the Famedly Roadmap"
labels: ["epic"]
body:
- type: markdown
attributes:
value: |
This should be filled out by product.
- type: textarea
id: summary
attributes:
label: summary
description: Please write a summary
validations:
required: true
- type: textarea
id: intended-outcome
attributes:
label: Intended Outcome
description: What is the outcome for the user?
validations:
required: true
- type: textarea
id: technical-solution
attributes:
label: How will it work?
description: Please write down, how it will work
- type: textarea
id: additional
attributes:
label: Additional Context
description: Please add any other infos that could be useful.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🛠️ Feature
description: "Create an new issue for a new Feature in Famedly"
labels: ["feature"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request
- type: checkboxes
id: preflight
attributes:
label: Preflight Checklist
options:
- label:
I could not find a solution in the existing issues, docs, nor discussions
required: true
- type: textarea
id: problem
attributes:
label: Describe your problem
description: Please describe your problem this new feature is supposed to solve.
placeholder: Describe the problem you have
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe your ideal solution
description: Which solution do you propose?
placeholder: As a [type of user], I want [some goal] so that [some reason].
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Which version of the Famedly are you using.
- type: textarea
id: security
attributes:
label: Security requirements
description: Plese add more information in terms of security requirements.
- type: textarea
id: additional
attributes:
label: Additional Context
description: Please add any other infos that could be useful.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/improvement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🛠️ Improvement
description: "Create an new issue for an improvment in Famedly"
labels: ["improvement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this improvement request
- type: checkboxes
id: preflight
attributes:
label: Preflight Checklist
options:
- label:
I could not find a solution in the existing issues, docs, nor discussions
required: true
- type: textarea
id: problem
attributes:
label: Describe your problem
description: Please describe your problem this improvement is supposed to solve.
placeholder: Describe the problem you have
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe your ideal solution
description: Which solution do you propose?
placeholder: As a [type of user], I want [some goal] so that [some reason].
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Which version of the Famedly are you using.
- type: textarea
id: security
attributes:
label: Security requirements
description: Plese add more information in terms of security requirements.
- type: textarea
id: additional
attributes:
label: Additional Context
description: Please add any other infos that could be useful.
6 changes: 4 additions & 2 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
strategy:
matrix:
homeserver: [synapse, dendrite, conduit]
# since the dendrite job is optional, actually run all tests to the end instead of failing on first error.
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Run tests
Expand All @@ -36,8 +38,8 @@ jobs:
scripts/prepare.sh
scripts/test_driver.sh"
# coverage is done on the flutter-linux image because we setup olm there
# coverage_without_olm is done on dart images because why not :D
# coverage is done on the flutter-linux image because we setup olm there
# coverage_without_olm is done on dart images because why not :D
coverage:
runs-on: ubuntu-latest
container:
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [0.22.5] - 20 October 2023
- build(deps): bump http from 0.13.6 to 1.1.0 (dependabot[bot])
- feat: Add methods to load all room keys from online key backup (Krille)
- fix: Convert linebreaks into br tags on markdown parsing (Krille)
- fix: fixed hardcoded historyCount (Ray)
- refactor: Trigger upload keys on sync and not in background job and upload them before logout (Krille)
- refactor: Update markdown (Krille)

## [0.22.4] - 21 September 2023
- feat: Implement member change type (Krille)
- fix: apply state event before decryption on leaved room (Mohammad Reza Moradi)
- fix: startDirectChat might return an unjoined room (Nicolas Werner)
- fix: storing the end of history pagination (Nicolas Werner)
- fix: userOwnsEncryptionKeys returns true for empty device lists (Nicolas Werner)
- fix: wait for online key backup key to be cached on reset (Nicolas Werner)
- refactor: Remove deprecated dart code metrics (Krille)
- chore: remove redundant log message (Nicolas Werner)
- ci: don't fail fast on dendrite failure (Nicolas Werner)

## [0.22.3] - 23th August 2023
- feat: Add option to not cache users in memory when requesting all of a room (krille-chan)
- fix: Has new messages is never true (Krille)
Expand Down
32 changes: 0 additions & 32 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,3 @@ analyzer:
# needed until crypto packages upgrade
- lib/src/database/database.g.dart
plugins:
# Show code metrics in IDE
# - dart_code_metrics

dart_code_metrics:
metrics:
cyclomatic-complexity: 20
number-of-arguments: 4
maximum-nesting-level: 5
source-lines-of-code: 50
# This is still unstable, so handle with care
maintainability-index: 40
metrics-exclude:
- test/**
rules:
#- newline-before-return
- no-boolean-literal-compare
- no-empty-block
#- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-arguments
- no-equal-then-else
- no-magic-number:
severity: style # too noisy otherwise atm
- avoid-late-keyword:
severity: style # too noisy otherwise atm
- avoid-non-null-assertion:
severity: style # too noisy otherwise atm
- avoid-unused-parameters
- binary-expression-operand-order
anti-patterns:
- long-method
- long-parameter-list
22 changes: 2 additions & 20 deletions lib/encryption/encryption.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ class Encryption {
olmAccount: olmAccount,
deviceId: isDehydratedDevice ? deviceId : ourDeviceId,
pickleKey: pickleKey);
_backgroundTasksRunning = ourDeviceId ==
client.deviceID; // Don't run tasks for dehydrated devices
_backgroundTasks(); // start the background tasks

if (!isDehydratedDevice) keyManager.startAutoUploadKeys();
}

bool isMinOlmVersion(int major, int minor, int patch) {
Expand Down Expand Up @@ -420,24 +419,7 @@ class Encryption {
}
}

// this method is responsible for all background tasks, such as uploading online key backups
bool _backgroundTasksRunning = true;
void _backgroundTasks() {
if (!_backgroundTasksRunning || !client.isLogged()) {
return;
}

keyManager.backgroundTasks();

// autovalidateMasterOwnKey();

if (_backgroundTasksRunning) {
Timer(Duration(seconds: 10), _backgroundTasks);
}
}

Future<void> dispose() async {
_backgroundTasksRunning = false;
keyManager.dispose();
await olmManager.dispose();
keyVerificationManager.dispose();
Expand Down
Loading

0 comments on commit cf6b603

Please sign in to comment.