Skip to content

Commit

Permalink
Merge branch 'release/1.3.17' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Jan 31, 2022
2 parents 3c295e1 + c296b07 commit f187216
Show file tree
Hide file tree
Showing 100 changed files with 1,621 additions and 498 deletions.
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Changes in Element v1.3.17 (2022-01-31)
=======================================

Bugfixes 🐛
----------
- Display static map images in the timeline and improve Location sharing feature ([#5084](https://github.com/vector-im/element-android/issues/5084))
- Show the legal mention of mapbox when sharing location ([#5062](https://github.com/vector-im/element-android/issues/5062))
- Poll cannot end in some unencrypted rooms ([#5067](https://github.com/vector-im/element-android/issues/5067))
- Selecting Transfer in a call should immediately put the other person on hold until the call connects or the Transfer is cancelled. ([#5081](https://github.com/vector-im/element-android/issues/5081))
- Fixing crashes when quickly scrolling or restoring the room timeline ([#5091](https://github.com/vector-im/element-android/issues/5091))


Changes in Element 1.3.16 (2022-01-25)
======================================

Expand Down Expand Up @@ -47,6 +59,11 @@ Other changes
- Exclude dependabot upgrade for @github-script@v3 ([#4988](https://github.com/vector-im/element-android/issues/4988))
- Small iteration on command parser and unit test it. ([#4998](https://github.com/vector-im/element-android/issues/4998))

SDK API changes ⚠️
------------------
- `StateService.sendStateEvent()` now takes a non-nullable String for the parameter `stateKey`. If null was used, just now use an empty string. ([#4895](https://github.com/vector-im/element-android/issues/4895))
- 429 are not automatically retried anymore in case of too long retry delay ([#4995](https://github.com/vector-im/element-android/issues/4995))


Changes in Element v1.3.15 (2022-01-18)
=======================================
Expand Down
1 change: 0 additions & 1 deletion changelog.d/4895.removal

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4995.removal

This file was deleted.

2 changes: 2 additions & 0 deletions fastlane/metadata/android/cs-CZ/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hlavní změny v této verzi: Změna na úvodních obrazovkách, včetně přihlášení do služby Analytics. V experimentálních funkcích byla přidána podpora pro události s matematikou.
Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/cs-CZ/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hlavní změny v této verzi: Změna na úvodních obrazovkách, včetně přihlášení do služby Analytics. V experimentálních funkcích byla přidána podpora pro události s matematikou.
Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/cs-CZ/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hlavní změny v této verzi: Změna na úvodních obrazovkách, včetně přihlášení do služby Analytics. V experimentálních funkcích byla přidána podpora pro události s matematikou.
Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/de-DE/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hauptänderungen: Neues Onboarding, Unterstützung für Mathematische Ausdrücke in Labs
Änderungsliste: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/de-DE/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hauptänderungen: Neues Onboarding, Unterstützung für Mathematische Ausdrücke in Labs
Änderungsliste: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/de-DE/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hauptänderungen: Neues Onboarding, Unterstützung für Mathematische Ausdrücke in Labs
Änderungsliste: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/40103170.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Main changes in this version: send your location to any room. Edit poll.
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.3.17
2 changes: 2 additions & 0 deletions fastlane/metadata/android/et/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: liitumisvaate täiendused, võimalus saata meile analüütikat. Katsete alla on lisandunud üritused ning matemaatiliste valemite kirjutamise võimalus.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/et/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: liitumisvaate täiendused, võimalus saata meile analüütikat. Katsete alla on lisandunud üritused ning matemaatiliste valemite kirjutamise võimalus.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/et/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: liitumisvaate täiendused, võimalus saata meile analüütikat. Katsete alla on lisandunud üritused ning matemaatiliste valemite kirjutamise võimalus.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/hu-HU/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fő változás ebben a verzióban: Első változások a bemutató képernyőn, beleértve az analitikai adatküldés engedélyezésének lehetőségét. Matematikai formulák támogatása a Laborok között.
Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/hu-HU/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fő változás ebben a verzióban: Első változások a bemutató képernyőn, beleértve az analitikai adatküldés engedélyezésének lehetőségét. Matematikai formulák támogatása a Laborok között.
Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/hu-HU/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fő változás ebben a verzióban: Első változások a bemutató képernyőn, beleértve az analitikai adatküldés engedélyezésének lehetőségét. Matematikai formulák támogatása a Laborok között.
Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/id/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Perubahan utama dalam versi ini: Perubahan pertama di layar permulaan, termasuk analitik opt-in. Dukungan untuk Peristiwa dengan Matematika ditambahkan di Uji Coba.
Changelog lanjutan:
2 changes: 2 additions & 0 deletions fastlane/metadata/android/id/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Perubahan utama dalam versi ini: Perubahan pertama di layar permulaan, termasuk analitik opt-in. Dukungan untuk Peristiwa dengan Matematika ditambahkan di Uji Coba.
Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/id/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Perubahan utama dalam versi ini: Perubahan pertama di layar permulaan, termasuk analitik opt-in. Dukungan untuk Peristiwa dengan Matematika ditambahkan di Uji Coba.
Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it-IT/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Modifiche principali in questa versione: prima modifica nelle schermate onboarding, incluso l'opt-in di Analytics. Supporto agli eventi con Math aggiunto nei laboratori.
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it-IT/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Modifiche principali in questa versione: prima modifica nelle schermate onboarding, incluso l'opt-in di Analytics. Supporto agli eventi con Math aggiunto nei laboratori.
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it-IT/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Modifiche principali in questa versione: prima modifica nelle schermate onboarding, incluso l'opt-in di Analytics. Supporto agli eventi con Math aggiunto nei laboratori.
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/pt-BR/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Principais mudanças nesta versão: Primeira mudança em telas de onboarding, incluindo opt-in de Analítica. Suporte para Eventos com Matemática adicionado nos labs.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/pt-BR/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Principais mudanças nesta versão: Primeira mudança em telas de onboarding, incluindo opt-in de Analítica. Suporte para Eventos com Matemática adicionado nos labs.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/pt-BR/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Principais mudanças nesta versão: Primeira mudança em telas de onboarding, incluindo opt-in de Analítica. Suporte para Eventos com Matemática adicionado nos labs.
Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/sk/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hlavné zmeny v tejto verzii: Prvá zmena v obrazovkách pri vstupe do systému vrátane prihlásenia do služby Analytics. Pridanie podpory pre udalosti s matematikou v laboratóriách.
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/sk/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hlavné zmeny v tejto verzii: Prvá zmena v obrazovkách pri vstupe do systému vrátane prihlásenia do služby Analytics. Pridanie podpory pre udalosti s matematikou v laboratóriách.
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/sk/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hlavné zmeny v tejto verzii: Prvá zmena v obrazovkách pri vstupe do systému vrátane prihlásenia do služby Analytics. Pridanie podpory pre udalosti s matematikou v laboratóriách.
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/uk/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Основні зміни у цій версії: перша зміна на екрані привітання, включно з увімкненням аналітики. У лабораторії додано підтримку подій з математичними формулами.
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/uk/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Основні зміни у цій версії: перша зміна на екрані привітання, включно з увімкненням аналітики. У лабораторії додано підтримку подій з математичними формулами.
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/uk/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Основні зміни у цій версії: перша зміна на екрані привітання, включно з увімкненням аналітики. У лабораторії додано підтримку подій з математичними формулами.
Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.3.15
2 changes: 2 additions & 0 deletions fastlane/metadata/android/zh-TW/changelogs/40103130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
此版本中的主要變動:首次使用畫面的第一個變化,包含了選擇加入的分析功能。新增對數學活動的支援至實驗室中。
完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.3.13
2 changes: 2 additions & 0 deletions fastlane/metadata/android/zh-TW/changelogs/40103140.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
此版本中的主要變動:首次使用畫面的第一個變化,包含了選擇加入的分析功能。新增對數學活動的支援至實驗室中。
完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.3.14
2 changes: 2 additions & 0 deletions fastlane/metadata/android/zh-TW/changelogs/40103150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
此版本中的主要變動:首次使用畫面的第一個變化,包含了選擇加入的分析功能。新增對數學活動的支援至實驗室中。
完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.3.15
6 changes: 6 additions & 0 deletions library/ui-styles/src/main/res/values-ldrtl/bools.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<bool name="is_rtl">true</bool>

</resources>
2 changes: 2 additions & 0 deletions library/ui-styles/src/main/res/values/bools.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
<!-- Created to detect what has to be implemented (especially in the settings) -->
<bool name="false_not_implemented">false</bool>

<bool name="is_rtl">false</bool>

</resources>
4 changes: 2 additions & 2 deletions matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'

buildConfigField "String", "SDK_VERSION", "\"1.3.16\""
buildConfigField "String", "SDK_VERSION", "\"1.3.17\""

buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
resValue "string", "git_sdk_revision", "\"${gitRevision()}\""
Expand Down Expand Up @@ -164,7 +164,7 @@ dependencies {
implementation libs.apache.commonsImaging

// Phone number https://github.com/google/libphonenumber
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.41'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.42'

testImplementation libs.tests.junit
testImplementation 'org.robolectric:robolectric:4.7.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ data class MessageLocationContent(
@Json(name = "m.new_content") override val newContent: Content? = null,

/**
* m.asset defines a generic asset that can be used for location tracking but also in other places like inventories, geofencing, checkins/checkouts etc.
* m.asset defines a generic asset that can be used for location tracking but also in other places like
* inventories, geofencing, checkins/checkouts etc.
* It should contain a mandatory namespaced type key defining what particular asset is being referred to.
* For the purposes of user location tracking m.self should be used in order to avoid duplicating the mxid.
*/
Expand All @@ -62,5 +63,5 @@ data class MessageLocationContent(
@Json(name = "org.matrix.msc1767.text") val text: String? = null
) : MessageContent {

fun getUri() = locationInfo?.geoUri ?: geoUri
fun getBestGeoUri() = locationInfo?.geoUri ?: geoUri
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ internal class DefaultProcessEventForPushTask @Inject constructor(
event to it
}
}
Timber.d("[PushRules] matched ${matchedEvents.size} out of ${allEvents.size}")

val allRedactedEvents = params.syncResponse.join
.asSequence()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import org.matrix.android.sdk.api.session.room.model.message.MessagePollResponse
import org.matrix.android.sdk.api.session.room.model.message.MessageRelationContent
import org.matrix.android.sdk.api.session.room.model.relation.ReactionContent
import org.matrix.android.sdk.api.session.room.powerlevels.PowerLevelsHelper
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.session.room.timeline.getLastMessageContent
import org.matrix.android.sdk.internal.SessionManager
import org.matrix.android.sdk.internal.crypto.model.event.EncryptedEventContent
Expand Down Expand Up @@ -344,15 +345,7 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
val targetEventId = relatedEventId ?: content.relatesTo?.eventId ?: return
val eventTimestamp = event.originServerTs ?: return

val session = sessionManager.getSessionComponent(sessionId)?.session()

val targetPollEvent = session?.getRoom(roomId)?.getTimeLineEvent(targetEventId) ?: return Unit.also {
Timber.v("## POLL target poll event $targetEventId not found in room $roomId")
}

val targetPollContent = targetPollEvent.getLastMessageContent() as? MessagePollContent ?: return Unit.also {
Timber.v("## POLL target poll event $targetEventId content is malformed")
}
val targetPollContent = getPollContent(roomId, targetEventId) ?: return

// ok, this is a poll response
var existing = EventAnnotationsSummaryEntity.where(realm, roomId, targetEventId).findFirst()
Expand Down Expand Up @@ -453,6 +446,17 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
isLocalEcho: Boolean) {
val pollEventId = content.relatesTo?.eventId ?: return

val pollOwnerId = getPollEvent(roomId, pollEventId)?.root?.senderId
val isPollOwner = pollOwnerId == event.senderId

val powerLevelsHelper = stateEventDataSource.getStateEvent(roomId, EventType.STATE_ROOM_POWER_LEVELS, QueryStringValue.NoCondition)
?.content?.toModel<PowerLevelsContent>()
?.let { PowerLevelsHelper(it) }
if (!isPollOwner && !powerLevelsHelper?.isUserAbleToRedact(event.senderId ?: "").orFalse()) {
Timber.v("## Received poll.end event $pollEventId but user ${event.senderId} doesn't have enough power level in room $roomId")
return
}

var existing = EventAnnotationsSummaryEntity.where(realm, roomId, pollEventId).findFirst()
if (existing == null) {
Timber.v("## POLL creating new relation summary for $pollEventId")
Expand All @@ -470,14 +474,6 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
return
}

val powerLevelsHelper = stateEventDataSource.getStateEvent(roomId, EventType.STATE_ROOM_POWER_LEVELS, QueryStringValue.NoCondition)
?.content?.toModel<PowerLevelsContent>()
?.let { PowerLevelsHelper(it) }
if (!powerLevelsHelper?.isUserAbleToRedact(event.senderId ?: "").orFalse()) {
Timber.v("## Received poll.end event $pollEventId but user ${event.senderId} doesn't have enough power level in room $roomId")
return
}

val txId = event.unsignedData?.transactionId
// is it a remote echo?
if (!isLocalEcho && existingPollSummary.sourceLocalEchoEvents.contains(txId)) {
Expand All @@ -491,6 +487,21 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
existingPollSummary.closedTime = event.originServerTs
}

private fun getPollEvent(roomId: String, eventId: String): TimelineEvent? {
val session = sessionManager.getSessionComponent(sessionId)?.session()
return session?.getRoom(roomId)?.getTimeLineEvent(eventId) ?: return null.also {
Timber.v("## POLL target poll event $eventId not found in room $roomId")
}
}

private fun getPollContent(roomId: String, eventId: String): MessagePollContent? {
val pollEvent = getPollEvent(roomId, eventId) ?: return null

return pollEvent.getLastMessageContent() as? MessagePollContent ?: return null.also {
Timber.v("## POLL target poll event $eventId content is malformed")
}
}

private fun handleInitialAggregatedRelations(realm: Realm,
event: Event,
roomId: String,
Expand Down
4 changes: 2 additions & 2 deletions vector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ext.versionMinor = 3
// Note: even values are reserved for regular release, odd values for hotfix release.
// When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release.
ext.versionPatch = 16
ext.versionPatch = 17

static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'
Expand Down Expand Up @@ -373,7 +373,7 @@ dependencies {
implementation 'com.facebook.stetho:stetho:1.6.0'

// Phone number https://github.com/google/libphonenumber
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.41'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.42'

// FlowBinding
implementation libs.github.flowBinding
Expand Down
Loading

0 comments on commit f187216

Please sign in to comment.