merge devel

This commit is contained in:
or-else
2025-11-07 19:33:14 +03:00
15 changed files with 23 additions and 67 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "tinode-webapp", "name": "tinode-webapp",
"description": "Tinode messenger for the web", "description": "Tinode messenger for the web",
"version": "0.25.0-beta2", "version": "0.25.0-beta3",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/tinode/webapp.git" "url": "git+https://github.com/tinode/webapp.git"
@@ -75,7 +75,7 @@
"react": "^18.3.0", "react": "^18.3.0",
"react-dom": "^18.3.0", "react-dom": "^18.3.0",
"react-intl": "^7.0.0", "react-intl": "^7.0.0",
"tinode-sdk": "^0.25.0-beta1", "tinode-sdk": "^0.25.0-beta3",
"webm-duration-fix": "^1.0.4" "webm-duration-fix": "^1.0.4"
}, },
"devDependencies": { "devDependencies": {
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit. // This is a generated file. Don't edit.
export const PACKAGE_VERSION = "0.25.0-beta2"; export const PACKAGE_VERSION = "0.25.0-beta3";
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -8695,7 +8695,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PACKAGE_VERSION: function() { return /* binding */ PACKAGE_VERSION; } /* harmony export */ PACKAGE_VERSION: function() { return /* binding */ PACKAGE_VERSION; }
/* harmony export */ }); /* harmony export */ });
const PACKAGE_VERSION = "0.25.0-beta2"; const PACKAGE_VERSION = "0.25.0-beta3";
/***/ }), /***/ }),
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8 -52
View File
@@ -3753,38 +3753,6 @@ class TopicMe extends _topic_js__WEBPACK_IMPORTED_MODULE_2__["default"] {
getCredentials() { getCredentials() {
return this._credentials; return this._credentials;
} }
pinTopic(topic, pin) {
if (!this._attached) {
return Promise.reject(new Error("Cannot pin topic in inactive 'me' topic"));
}
if (!_topic_js__WEBPACK_IMPORTED_MODULE_2__["default"].isCommTopicName(topic)) {
return Promise.reject(new Error("Invalid topic to pin"));
}
const tpin = Array.isArray(this.private && this.private.tpin) ? this.private.tpin : [];
const found = tpin.includes(topic);
if (pin && found || !pin && !found) {
return Promise.resolve(tpin);
}
if (pin) {
tpin.unshift(topic);
} else {
tpin.splice(tpin.indexOf(topic), 1);
}
return this.setMeta({
desc: {
private: {
tpin: tpin.length > 0 ? tpin : _config_js__WEBPACK_IMPORTED_MODULE_1__.DEL_CHAR
}
}
});
}
pinnedTopicRank(topic) {
if (!this.private || !this.private.tpin) {
return 0;
}
const idx = this.private.tpin.indexOf(topic);
return idx < 0 ? 0 : this.private.tpin.length - idx;
}
} }
/***/ }), /***/ }),
@@ -4347,12 +4315,6 @@ class Topic {
} }
return Promise.resolve(); return Promise.resolve();
} }
pinTopic(topic, pin) {
return Promise.reject(new Error("Pinning topics is not supported here"));
}
pinnedTopicRank(topic) {
return 0;
}
delMessages(ranges, hard) { delMessages(ranges, hard) {
if (!this._attached) { if (!this._attached) {
return Promise.reject(new Error("Cannot delete messages in inactive topic")); return Promise.reject(new Error("Cannot delete messages in inactive topic"));
@@ -5044,14 +5006,10 @@ class Topic {
acs: sub.acs acs: sub.acs
}); });
} }
if (!this._users[sub.user]) {
this.subcnt++;
}
user = this._updateCachedUser(sub.user, sub); user = this._updateCachedUser(sub.user, sub);
} else { } else {
delete this._users[sub.user]; delete this._users[sub.user];
user = sub; user = sub;
this.subcnt--;
} }
if (this.onMetaSub) { if (this.onMetaSub) {
this.onMetaSub(user); this.onMetaSub(user);
@@ -5246,7 +5204,7 @@ function rfc3339DateString(d) {
const millis = d.getUTCMilliseconds(); const millis = d.getUTCMilliseconds();
return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + (millis ? '.' + pad(millis, 3) : '') + 'Z'; return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + (millis ? '.' + pad(millis, 3) : '') + 'Z';
} }
function mergeObj(dst, src) { function mergeObj(dst, src, ignore) {
if (typeof src != 'object') { if (typeof src != 'object') {
if (src === undefined) { if (src === undefined) {
return dst; return dst;
@@ -5257,7 +5215,7 @@ function mergeObj(dst, src) {
return src; return src;
} }
if (src === null) { if (src === null) {
return dst; return src;
} }
if (src instanceof Date && !isNaN(src)) { if (src instanceof Date && !isNaN(src)) {
return !dst || !(dst instanceof Date) || isNaN(dst) || dst < src ? src : dst; return !dst || !(dst instanceof Date) || isNaN(dst) || dst < src ? src : dst;
@@ -5272,18 +5230,16 @@ function mergeObj(dst, src) {
dst = src.constructor(); dst = src.constructor();
} }
for (let prop in src) { for (let prop in src) {
if (src.hasOwnProperty(prop) && prop != '_noForwarding') { if (src.hasOwnProperty(prop) && (!ignore || !ignore[prop]) && prop != '_noForwarding') {
try { try {
dst[prop] = mergeObj(dst[prop], src[prop]); dst[prop] = mergeObj(dst[prop], src[prop]);
} catch (err) { } catch (err) {}
console.warn("Error merging property:", prop, err);
}
} }
} }
return dst; return dst;
} }
function mergeToCache(cache, key, newval) { function mergeToCache(cache, key, newval, ignore) {
cache[key] = mergeObj(cache[key], newval); cache[key] = mergeObj(cache[key], newval, ignore);
return cache[key]; return cache[key];
} }
function simplify(obj) { function simplify(obj) {
@@ -5429,7 +5385,7 @@ function clipInRange(src, clip) {
hi: Math.min(src.hi, clip.hi) hi: Math.min(src.hi, clip.hi)
}; };
// removed by dead control flow // removed by dead control flow
{}
} }
/***/ }), /***/ }),
@@ -5444,7 +5400,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION) /* harmony export */ PACKAGE_VERSION: () => (/* binding */ PACKAGE_VERSION)
/* harmony export */ }); /* harmony export */ });
const PACKAGE_VERSION = "0.25.0-beta1"; const PACKAGE_VERSION = "0.24.4";
/***/ }) /***/ })
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit. // This is a generated file. Don't edit.
const PACKAGE_VERSION = "0.25.0-beta2"; const PACKAGE_VERSION = "0.25.0-beta3";