Merge branch 'master' into soru/cross-signing

This commit is contained in:
Sorunome 2020-06-09 20:24:22 +02:00
commit 6d49b4def3
No known key found for this signature in database
GPG key ID: B19471D07FC9BE9C
3 changed files with 13 additions and 12 deletions

View file

@ -12,10 +12,10 @@ coverage:
script: script:
- apt update - apt update
- apt install -y curl gnupg2 git - apt install -y curl gnupg2 git
- curl https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.2/linux_packages/dart_2.7.2-1_amd64.deb > dart.deb - curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- apt install -y ./dart.deb - curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
- apt update - apt update
- apt install -y chromium lcov libolm3 sqlite3 libsqlite3-dev - apt install -y dart chromium lcov libolm3 sqlite3 libsqlite3-dev
- ln -s /usr/lib/dart/bin/pub /usr/bin/ - ln -s /usr/lib/dart/bin/pub /usr/bin/
- useradd -m test - useradd -m test
- chown -R 'test:' '.' - chown -R 'test:' '.'
@ -27,19 +27,19 @@ coverage:
paths: paths:
- coverage/ - coverage/
coverage_without_olm: coverage_without_olm:
tags: tags:
- linux - linux
stage: coverage stage: coverage
image: debian:testing image: debian:testing
coverage: '/^\s+lines.+: (\d+.\d*%)/'
dependencies: [] dependencies: []
script: script:
- apt update - apt update
- apt install -y curl git sqlite3 libsqlite3-dev - apt install -y curl gnupg2 git sqlite3 libsqlite3-dev
- curl https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.2/linux_packages/dart_2.7.2-1_amd64.deb > dart.deb - curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- apt install -y ./dart.deb - curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
- apt update
- apt install -y dart
- ln -s /usr/lib/dart/bin/pub /usr/bin/ - ln -s /usr/lib/dart/bin/pub /usr/bin/
- useradd -m test - useradd -m test
- chown -R 'test:' '.' - chown -R 'test:' '.'
@ -101,5 +101,4 @@ pages:
paths: paths:
- public - public
only: only:
- master - master

View file

@ -1327,7 +1327,7 @@ class MatrixApi {
headers['Content-Type'] = contentType ?? mime(fileName); headers['Content-Type'] = contentType ?? mime(fileName);
fileName = Uri.encodeQueryComponent(fileName); fileName = Uri.encodeQueryComponent(fileName);
final url = final url =
'$homeserver.toString()/_matrix/media/r0/upload?filename=$fileName'; '${homeserver.toString()}/_matrix/media/r0/upload?filename=$fileName';
final streamedRequest = http.StreamedRequest('POST', Uri.parse(url)) final streamedRequest = http.StreamedRequest('POST', Uri.parse(url))
..headers.addAll(headers); ..headers.addAll(headers);
streamedRequest.contentLength = await file.length; streamedRequest.contentLength = await file.length;
@ -2022,6 +2022,7 @@ class MatrixApi {
final response = await request( final response = await request(
RequestType.POST, RequestType.POST,
'/client/r0/user/${Uri.encodeComponent(userId)}/openid/request_token', '/client/r0/user/${Uri.encodeComponent(userId)}/openid/request_token',
data: {},
); );
return OpenIdCredentials.fromJson(response); return OpenIdCredentials.fromJson(response);
} }

View file

@ -185,7 +185,8 @@ class Room {
} }
/// The address in the format: #roomname:homeserver.org. /// The address in the format: #roomname:homeserver.org.
String get canonicalAlias => states[EventTypes.RoomCanonicalAlias] != null String get canonicalAlias => states[EventTypes.RoomCanonicalAlias] != null &&
states[EventTypes.RoomCanonicalAlias].content['alias'] is String
? states[EventTypes.RoomCanonicalAlias].content['alias'] ? states[EventTypes.RoomCanonicalAlias].content['alias']
: ''; : '';