Skip to content

Commit 7b15cf1

Browse files
committed
Merge branch 'devel'
2 parents 66192a8 + df03509 commit 7b15cf1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1409
-1127
lines changed

index-dev.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
3030
<!-- Styles for local elements -->
3131
<link rel="stylesheet" href="css/base.css" />
32+
<!-- Polyfill Intl.Segmenter for Firefox 124 and earlier. This can be safely removed in the end of 2024. -->
33+
<script crossorigin="anonymous" src="https://polyfill-fastly.io/v3/polyfill.min.js?features=Intl.Segmenter"></script>
3234
<!-- ReactJS -->
3335
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react@18/umd/react.development.js"></script>
3436
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.development.js"></script>

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700,700i" />
2424
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
2525
<link rel="stylesheet" href="css/base.min.css" />
26+
<script crossorigin="anonymous" src="https://polyfill-fastly.io/v3/polyfill.min.js?features=Intl.Segmenter"></script>
2627
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.production.min.js"></script>
2728
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.production.min.js"></script>
2829
<script crossorigin="anonymous" src="https://cdn.jsdelivr.net/npm/react-intl@6.4.4/react-intl.iife.min.js"></script>

package-lock.json

Lines changed: 1153 additions & 1093 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tinode-webapp",
33
"description": "Tinode messenger for the web",
4-
"version": "0.22.12",
4+
"version": "0.22.13",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/tinode/webapp.git"
@@ -71,7 +71,7 @@
7171
"react": "^18.2.0",
7272
"react-dom": "^18.2.0",
7373
"react-intl": "^6.4.4",
74-
"tinode-sdk": "^0.22.12",
74+
"tinode-sdk": "^0.22.13",
7575
"webm-duration-fix": "^1.0.4"
7676
},
7777
"devDependencies": {

src/lib/utils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export function sanitizeUrlForMime(url, mimeMajor) {
174174

175175
// Append query parameter 'asatt=1' to the URL.
176176
// It will cause Tinode server to add 'Content-Disposition: attachment' header when serving it.
177-
// The URL here is always absolute.
177+
// The URL is a string. The URL here is always absolute.
178178
export function urlAsAttachment(url) {
179179
// TODO: check if URL is local or remote, i.e. compare to window.location.origin.
180180
/*
@@ -184,6 +184,11 @@ export function urlAsAttachment(url) {
184184
}
185185
}
186186
*/
187+
// Check if the URL is a data or blob. Do not alter such URLs.
188+
if (url.startsWith('data:') || url.startsWith('blob:')) {
189+
return url;
190+
}
191+
187192
// Split URL into host+path, query, fragment.
188193
let query = '', fragment = '';
189194
const idxF = url.indexOf('#');

src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This is a generated file. Don't edit.
22

3-
export const PACKAGE_VERSION = "0.22.12";
3+
export const PACKAGE_VERSION = "0.22.13";

umd/0.prod.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

umd/0.prod.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)