fix issues with video uploading and display
This commit is contained in:
@@ -172,6 +172,7 @@ export function deliveryMarker(received) {
|
||||
case Tinode.MESSAGE_STATUS_SENDING:
|
||||
return { name: 'access_time' }; // watch face
|
||||
case Tinode.MESSAGE_STATUS_FAILED:
|
||||
case Tinode.MESSAGE_STATUS_FATAL:
|
||||
return { name: 'warning', color: 'danger-color' }; // yellow icon /!\
|
||||
case Tinode.MESSAGE_STATUS_SENT:
|
||||
return { name: 'done' }; // checkmark
|
||||
|
||||
+11
-10
@@ -457,24 +457,24 @@ class MessagesView extends React.Component {
|
||||
this.setState({topic: ctrl.topic});
|
||||
}
|
||||
this.props.onNewTopicCreated(this.props.topic, ctrl.topic);
|
||||
// If there are unsent messages (except video call messages),
|
||||
// try sending them now. Unsent video call messages will be dropped.
|
||||
let calls = [];
|
||||
topic.queuedMessages((pub) => {
|
||||
// If there are unsent messages (except hard-failed and video call messages),
|
||||
// try sending them now. Hard-failed and unsent video call messages will be dropped.
|
||||
let discard = [];
|
||||
topic.queuedMessages(pub => {
|
||||
if (pub._sending) {
|
||||
return;
|
||||
}
|
||||
if (pub.head && pub.head.webrtc) {
|
||||
// Filter out unsent video call messages.
|
||||
calls.push(pub.seq);
|
||||
if (pub._fatal || (pub.head && pub.head.webrtc)) {
|
||||
// Filter out unsent failed & video call messages.
|
||||
discard.push(pub.seq);
|
||||
return;
|
||||
}
|
||||
if (topic.isSubscribed()) {
|
||||
this.retrySend(pub);
|
||||
}
|
||||
});
|
||||
if (calls.length > 0) {
|
||||
topic.delMessagesList(calls, true);
|
||||
if (discard.length > 0) {
|
||||
topic.delMessagesList(discard, true);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
@@ -1057,8 +1057,8 @@ class MessagesView extends React.Component {
|
||||
// Small preview to show while uploading.
|
||||
b64conv[2] = imageScaled(previewBlob, VIDEO_PREVIEW_DIM, VIDEO_PREVIEW_DIM, -1, false)
|
||||
.then(scaled => blobToBase64(scaled.blob));
|
||||
// Convert tiny image into base64 for serialization and previewing.
|
||||
Promise.all(b64conv)
|
||||
// Convert tiny image into base64 for serialization and previewing.
|
||||
.then(b64s => {
|
||||
const [video, img, preview] = b64s;
|
||||
let msg = Drafty.insertVideo(null, 0, {
|
||||
@@ -1074,6 +1074,7 @@ class MessagesView extends React.Component {
|
||||
size: videoBlob.size,
|
||||
urlPromise: uploadCompletionPromise
|
||||
});
|
||||
|
||||
if (caption) {
|
||||
msg = Drafty.appendLineBreak(msg);
|
||||
msg = Drafty.append(msg, Drafty.parse(caption));
|
||||
|
||||
@@ -93,7 +93,7 @@ class BaseChatMessage extends React.PureComponent {
|
||||
if (this.props.received == Tinode.MESSAGE_STATUS_FAILED) {
|
||||
menuItems.push('menu_item_send_retry');
|
||||
}
|
||||
if (this.props.userIsWriter && this.props.received > Tinode.MESSAGE_STATUS_FAILED) {
|
||||
if (this.props.userIsWriter && this.props.received > Tinode.MESSAGE_STATUS_FATAL) {
|
||||
menuItems.push('menu_item_reply');
|
||||
if (!this.props.response) {
|
||||
let immutable = false;
|
||||
|
||||
@@ -31,7 +31,7 @@ export default class InlineVideo extends React.PureComponent {
|
||||
{this.props.onClick ?
|
||||
<i className="material-icons white bigger">play_arrow</i>
|
||||
:
|
||||
<img src="img/broken_video.png" width="36" height="36" />}
|
||||
<img src="img/broken_video.png" style={{filter: 'invert(100%)'}} width="36" height="36" />}
|
||||
</div>
|
||||
{duration ? <div className="duration">{duration}</div> : null}
|
||||
</div>
|
||||
|
||||
@@ -30,7 +30,8 @@ class ReceivedMarker extends React.PureComponent {
|
||||
let timestamp;
|
||||
if (this.props.received <= Tinode.MESSAGE_STATUS_SENDING) {
|
||||
timestamp = formatMessage(messages.message_sending);
|
||||
} else if (this.props.received == Tinode.MESSAGE_STATUS_FAILED) {
|
||||
} else if (this.props.received == Tinode.MESSAGE_STATUS_FAILED ||
|
||||
this.props.received == Tinode.MESSAGE_STATUS_FATAL) {
|
||||
timestamp = formatMessage(messages.message_sending_failed);
|
||||
} else {
|
||||
timestamp = this.props.timestamp.toLocaleTimeString(this.props.intl.locale, { timeStyle: 'short' });
|
||||
|
||||
+11
-7
@@ -3525,6 +3525,7 @@ function deliveryMarker(received) {
|
||||
name: 'access_time'
|
||||
};
|
||||
case tinode_sdk__WEBPACK_IMPORTED_MODULE_0__.Tinode.MESSAGE_STATUS_FAILED:
|
||||
case tinode_sdk__WEBPACK_IMPORTED_MODULE_0__.Tinode.MESSAGE_STATUS_FATAL:
|
||||
return {
|
||||
name: 'warning',
|
||||
color: 'danger-color'
|
||||
@@ -5458,21 +5459,21 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
||||
});
|
||||
}
|
||||
this.props.onNewTopicCreated(this.props.topic, ctrl.topic);
|
||||
let calls = [];
|
||||
let discard = [];
|
||||
topic.queuedMessages(pub => {
|
||||
if (pub._sending) {
|
||||
return;
|
||||
}
|
||||
if (pub.head && pub.head.webrtc) {
|
||||
calls.push(pub.seq);
|
||||
if (pub._fatal || pub.head && pub.head.webrtc) {
|
||||
discard.push(pub.seq);
|
||||
return;
|
||||
}
|
||||
if (topic.isSubscribed()) {
|
||||
this.retrySend(pub);
|
||||
}
|
||||
});
|
||||
if (calls.length > 0) {
|
||||
topic.delMessagesList(calls, true);
|
||||
if (discard.length > 0) {
|
||||
topic.delMessagesList(discard, true);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error("Failed subscription to", this.state.topic, err);
|
||||
@@ -11030,7 +11031,7 @@ class BaseChatMessage extends (react__WEBPACK_IMPORTED_MODULE_0___default().Pure
|
||||
if (this.props.received == tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_FAILED) {
|
||||
menuItems.push('menu_item_send_retry');
|
||||
}
|
||||
if (this.props.userIsWriter && this.props.received > tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_FAILED) {
|
||||
if (this.props.userIsWriter && this.props.received > tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_FATAL) {
|
||||
menuItems.push('menu_item_reply');
|
||||
if (!this.props.response) {
|
||||
let immutable = false;
|
||||
@@ -13590,6 +13591,9 @@ class InlineVideo extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
||||
className: "material-icons white bigger"
|
||||
}, "play_arrow") : react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", {
|
||||
src: "img/broken_video.png",
|
||||
style: {
|
||||
filter: 'invert(100%)'
|
||||
},
|
||||
width: "36",
|
||||
height: "36"
|
||||
})), duration ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
||||
@@ -14667,7 +14671,7 @@ class ReceivedMarker extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
let timestamp;
|
||||
if (this.props.received <= tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_SENDING) {
|
||||
timestamp = formatMessage(messages.message_sending);
|
||||
} else if (this.props.received == tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_FAILED) {
|
||||
} else if (this.props.received == tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_FAILED || this.props.received == tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Tinode.MESSAGE_STATUS_FATAL) {
|
||||
timestamp = formatMessage(messages.message_sending_failed);
|
||||
} else {
|
||||
timestamp = this.props.timestamp.toLocaleTimeString(this.props.intl.locale, {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+157
-140
@@ -411,6 +411,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ "LIBRARY": () => (/* binding */ LIBRARY),
|
||||
/* harmony export */ "LOCAL_SEQID": () => (/* binding */ LOCAL_SEQID),
|
||||
/* harmony export */ "MESSAGE_STATUS_FAILED": () => (/* binding */ MESSAGE_STATUS_FAILED),
|
||||
/* harmony export */ "MESSAGE_STATUS_FATAL": () => (/* binding */ MESSAGE_STATUS_FATAL),
|
||||
/* harmony export */ "MESSAGE_STATUS_NONE": () => (/* binding */ MESSAGE_STATUS_NONE),
|
||||
/* harmony export */ "MESSAGE_STATUS_QUEUED": () => (/* binding */ MESSAGE_STATUS_QUEUED),
|
||||
/* harmony export */ "MESSAGE_STATUS_READ": () => (/* binding */ MESSAGE_STATUS_READ),
|
||||
@@ -449,13 +450,14 @@ const TOPIC_P2P = 'p2p';
|
||||
const USER_NEW = 'new';
|
||||
const LOCAL_SEQID = 0xFFFFFFF;
|
||||
const MESSAGE_STATUS_NONE = 0;
|
||||
const MESSAGE_STATUS_QUEUED = 1;
|
||||
const MESSAGE_STATUS_SENDING = 2;
|
||||
const MESSAGE_STATUS_FAILED = 3;
|
||||
const MESSAGE_STATUS_SENT = 4;
|
||||
const MESSAGE_STATUS_RECEIVED = 5;
|
||||
const MESSAGE_STATUS_READ = 6;
|
||||
const MESSAGE_STATUS_TO_ME = 7;
|
||||
const MESSAGE_STATUS_QUEUED = 10;
|
||||
const MESSAGE_STATUS_SENDING = 20;
|
||||
const MESSAGE_STATUS_FAILED = 30;
|
||||
const MESSAGE_STATUS_FATAL = 40;
|
||||
const MESSAGE_STATUS_SENT = 50;
|
||||
const MESSAGE_STATUS_RECEIVED = 60;
|
||||
const MESSAGE_STATUS_READ = 70;
|
||||
const MESSAGE_STATUS_TO_ME = 80;
|
||||
const EXPIRE_PROMISES_TIMEOUT = 5000;
|
||||
const EXPIRE_PROMISES_PERIOD = 1000;
|
||||
const RECV_TIMEOUT = 100;
|
||||
@@ -3032,16 +3034,9 @@ class LargeFileHelper {
|
||||
this._version = version;
|
||||
this._apiKey = tinode._apiKey;
|
||||
this._authToken = tinode.getAuthToken();
|
||||
this._reqId = tinode.getNextUniqueId();
|
||||
this.xhr = new XHRProvider();
|
||||
this.toResolve = null;
|
||||
this.toReject = null;
|
||||
this.onProgress = null;
|
||||
this.onSuccess = null;
|
||||
this.onFailure = null;
|
||||
this.xhr = [];
|
||||
}
|
||||
uploadWithBaseUrl(baseUrl, data, avatarFor, onProgress, onSuccess, onFailure) {
|
||||
const instance = this;
|
||||
let url = `/v${this._version}/file/u/`;
|
||||
if (baseUrl) {
|
||||
let base = baseUrl;
|
||||
@@ -3054,24 +3049,31 @@ class LargeFileHelper {
|
||||
throw new Error(`Invalid base URL '${baseUrl}'`);
|
||||
}
|
||||
}
|
||||
this.xhr.open('POST', url, true);
|
||||
this.xhr.setRequestHeader('X-Tinode-APIKey', this._apiKey);
|
||||
const instance = this;
|
||||
const xhr = new XHRProvider();
|
||||
this.xhr.push(xhr);
|
||||
xhr.open('POST', url, true);
|
||||
xhr.setRequestHeader('X-Tinode-APIKey', this._apiKey);
|
||||
if (this._authToken) {
|
||||
this.xhr.setRequestHeader('X-Tinode-Auth', `Token ${this._authToken.token}`);
|
||||
xhr.setRequestHeader('X-Tinode-Auth', `Token ${this._authToken.token}`);
|
||||
}
|
||||
let toResolve = null;
|
||||
let toReject = null;
|
||||
const result = new Promise((resolve, reject) => {
|
||||
this.toResolve = resolve;
|
||||
this.toReject = reject;
|
||||
toResolve = resolve;
|
||||
toReject = reject;
|
||||
});
|
||||
this.onProgress = onProgress;
|
||||
this.onSuccess = onSuccess;
|
||||
this.onFailure = onFailure;
|
||||
this.xhr.upload.onprogress = e => {
|
||||
if (e.lengthComputable && instance.onProgress) {
|
||||
instance.onProgress(e.loaded / e.total);
|
||||
xhr.upload.onprogress = e => {
|
||||
if (e.lengthComputable) {
|
||||
if (onProgress) {
|
||||
onProgress(e.loaded / e.total);
|
||||
}
|
||||
if (this.onProgress) {
|
||||
this.onProgress(e.loaded / e.total);
|
||||
}
|
||||
}
|
||||
};
|
||||
this.xhr.onload = function () {
|
||||
xhr.onload = function () {
|
||||
let pkt;
|
||||
try {
|
||||
pkt = JSON.parse(this.response, _utils_js__WEBPACK_IMPORTED_MODULE_1__.jsonParseHelper);
|
||||
@@ -3085,53 +3087,53 @@ class LargeFileHelper {
|
||||
};
|
||||
}
|
||||
if (this.status >= 200 && this.status < 300) {
|
||||
if (instance.toResolve) {
|
||||
instance.toResolve(pkt.ctrl.params.url);
|
||||
if (toResolve) {
|
||||
toResolve(pkt.ctrl.params.url);
|
||||
}
|
||||
if (instance.onSuccess) {
|
||||
instance.onSuccess(pkt.ctrl);
|
||||
if (onSuccess) {
|
||||
onSuccess(pkt.ctrl);
|
||||
}
|
||||
} else if (this.status >= 400) {
|
||||
if (instance.toReject) {
|
||||
instance.toReject(new _comm_error_js__WEBPACK_IMPORTED_MODULE_0__["default"](pkt.ctrl.text, pkt.ctrl.code));
|
||||
if (toReject) {
|
||||
toReject(new _comm_error_js__WEBPACK_IMPORTED_MODULE_0__["default"](pkt.ctrl.text, pkt.ctrl.code));
|
||||
}
|
||||
if (instance.onFailure) {
|
||||
instance.onFailure(pkt.ctrl);
|
||||
if (onFailure) {
|
||||
onFailure(pkt.ctrl);
|
||||
}
|
||||
} else {
|
||||
instance._tinode.logger("ERROR: Unexpected server response status", this.status, this.response);
|
||||
}
|
||||
};
|
||||
this.xhr.onerror = function (e) {
|
||||
if (instance.toReject) {
|
||||
instance.toReject(e || new Error("failed"));
|
||||
xhr.onerror = function (e) {
|
||||
if (toReject) {
|
||||
toReject(e || new Error("failed"));
|
||||
}
|
||||
if (instance.onFailure) {
|
||||
instance.onFailure(null);
|
||||
if (onFailure) {
|
||||
onFailure(null);
|
||||
}
|
||||
};
|
||||
this.xhr.onabort = function (e) {
|
||||
if (instance.toReject) {
|
||||
instance.toReject(new Error("upload cancelled by user"));
|
||||
xhr.onabort = function (e) {
|
||||
if (toReject) {
|
||||
toReject(new Error("upload cancelled by user"));
|
||||
}
|
||||
if (instance.onFailure) {
|
||||
instance.onFailure(null);
|
||||
if (onFailure) {
|
||||
onFailure(null);
|
||||
}
|
||||
};
|
||||
try {
|
||||
const form = new FormData();
|
||||
form.append('file', data);
|
||||
form.set('id', this._reqId);
|
||||
form.set('id', this._tinode.getNextUniqueId());
|
||||
if (avatarFor) {
|
||||
form.set('topic', avatarFor);
|
||||
}
|
||||
this.xhr.send(form);
|
||||
xhr.send(form);
|
||||
} catch (err) {
|
||||
if (this.toReject) {
|
||||
this.toReject(err);
|
||||
if (toReject) {
|
||||
toReject(err);
|
||||
}
|
||||
if (this.onFailure) {
|
||||
this.onFailure(null);
|
||||
if (onFailure) {
|
||||
onFailure(null);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -3154,21 +3156,24 @@ class LargeFileHelper {
|
||||
return;
|
||||
}
|
||||
const instance = this;
|
||||
this.xhr.open('GET', relativeUrl, true);
|
||||
this.xhr.setRequestHeader('X-Tinode-APIKey', this._apiKey);
|
||||
this.xhr.setRequestHeader('X-Tinode-Auth', 'Token ' + this._authToken.token);
|
||||
this.xhr.responseType = 'blob';
|
||||
this.onProgress = onProgress;
|
||||
this.xhr.onprogress = function (e) {
|
||||
if (instance.onProgress) {
|
||||
instance.onProgress(e.loaded);
|
||||
const xhr = new XHRProvider();
|
||||
this.xhr.push(xhr);
|
||||
xhr.open('GET', relativeUrl, true);
|
||||
xhr.setRequestHeader('X-Tinode-APIKey', this._apiKey);
|
||||
xhr.setRequestHeader('X-Tinode-Auth', 'Token ' + this._authToken.token);
|
||||
xhr.responseType = 'blob';
|
||||
xhr.onprogress = function (e) {
|
||||
if (onProgress) {
|
||||
onProgress(e.loaded);
|
||||
}
|
||||
};
|
||||
let toResolve = null;
|
||||
let toReject = null;
|
||||
const result = new Promise((resolve, reject) => {
|
||||
this.toResolve = resolve;
|
||||
this.toReject = reject;
|
||||
toResolve = resolve;
|
||||
toReject = reject;
|
||||
});
|
||||
this.xhr.onload = function () {
|
||||
xhr.onload = function () {
|
||||
if (this.status == 200) {
|
||||
const link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(new Blob([this.response], {
|
||||
@@ -3180,49 +3185,54 @@ class LargeFileHelper {
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(link.href);
|
||||
if (instance.toResolve) {
|
||||
instance.toResolve();
|
||||
if (toResolve) {
|
||||
toResolve();
|
||||
}
|
||||
} else if (this.status >= 400 && instance.toReject) {
|
||||
} else if (this.status >= 400 && toReject) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = function () {
|
||||
try {
|
||||
const pkt = JSON.parse(this.result, _utils_js__WEBPACK_IMPORTED_MODULE_1__.jsonParseHelper);
|
||||
instance.toReject(new _comm_error_js__WEBPACK_IMPORTED_MODULE_0__["default"](pkt.ctrl.text, pkt.ctrl.code));
|
||||
toReject(new _comm_error_js__WEBPACK_IMPORTED_MODULE_0__["default"](pkt.ctrl.text, pkt.ctrl.code));
|
||||
} catch (err) {
|
||||
instance._tinode.logger("ERROR: Invalid server response in LargeFileHelper", this.result);
|
||||
instance.toReject(err);
|
||||
toReject(err);
|
||||
}
|
||||
};
|
||||
reader.readAsText(this.response);
|
||||
}
|
||||
};
|
||||
this.xhr.onerror = function (e) {
|
||||
if (instance.toReject) {
|
||||
instance.toReject(new Error("failed"));
|
||||
xhr.onerror = function (e) {
|
||||
if (toReject) {
|
||||
toReject(new Error("failed"));
|
||||
}
|
||||
if (onError) {
|
||||
onError(e);
|
||||
}
|
||||
};
|
||||
this.xhr.onabort = function () {
|
||||
if (instance.toReject) {
|
||||
instance.toReject(null);
|
||||
xhr.onabort = function () {
|
||||
if (toReject) {
|
||||
toReject(null);
|
||||
}
|
||||
};
|
||||
try {
|
||||
this.xhr.send();
|
||||
xhr.send();
|
||||
} catch (err) {
|
||||
if (this.toReject) {
|
||||
this.toReject(err);
|
||||
if (toReject) {
|
||||
toReject(err);
|
||||
}
|
||||
if (onError) {
|
||||
onError(err);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
cancel() {
|
||||
if (this.xhr && this.xhr.readyState < 4) {
|
||||
this.xhr.abort();
|
||||
}
|
||||
}
|
||||
getId() {
|
||||
return this._reqId;
|
||||
this.xhr.forEach(req => {
|
||||
if (req.readyState < 4) {
|
||||
req.abort();
|
||||
}
|
||||
});
|
||||
}
|
||||
static setNetworkProvider(xhrProvider) {
|
||||
XHRProvider = xhrProvider;
|
||||
@@ -3371,11 +3381,12 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _access_mode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./access-mode.js */ "./src/access-mode.js");
|
||||
/* harmony import */ var _cbuffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cbuffer.js */ "./src/cbuffer.js");
|
||||
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config.js */ "./src/config.js");
|
||||
/* harmony import */ var _drafty_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./drafty.js */ "./src/drafty.js");
|
||||
/* harmony import */ var _drafty_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_drafty_js__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _meta_builder_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./meta-builder.js */ "./src/meta-builder.js");
|
||||
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils.js */ "./src/utils.js");
|
||||
/* harmony import */ var _comm_error_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./comm-error.js */ "./src/comm-error.js");
|
||||
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config.js */ "./src/config.js");
|
||||
/* harmony import */ var _drafty_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./drafty.js */ "./src/drafty.js");
|
||||
/* harmony import */ var _drafty_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_drafty_js__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _meta_builder_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./meta-builder.js */ "./src/meta-builder.js");
|
||||
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils.js */ "./src/utils.js");
|
||||
|
||||
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
@@ -3387,6 +3398,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
||||
|
||||
|
||||
|
||||
|
||||
class Topic {
|
||||
constructor(name, callbacks) {
|
||||
this._tinode = null;
|
||||
@@ -3399,7 +3411,7 @@ class Topic {
|
||||
this.public = null;
|
||||
this.trusted = null;
|
||||
this._users = {};
|
||||
this._queuedSeqId = _config_js__WEBPACK_IMPORTED_MODULE_2__.LOCAL_SEQID;
|
||||
this._queuedSeqId = _config_js__WEBPACK_IMPORTED_MODULE_3__.LOCAL_SEQID;
|
||||
this._maxSeq = 0;
|
||||
this._minSeq = 0;
|
||||
this._noEarlierMsgs = false;
|
||||
@@ -3432,34 +3444,34 @@ class Topic {
|
||||
}
|
||||
static topicType(name) {
|
||||
const types = {
|
||||
'me': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME,
|
||||
'fnd': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_FND,
|
||||
'grp': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_GRP,
|
||||
'new': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_GRP,
|
||||
'nch': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_GRP,
|
||||
'chn': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_GRP,
|
||||
'usr': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_P2P,
|
||||
'sys': _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_SYS
|
||||
'me': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME,
|
||||
'fnd': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_FND,
|
||||
'grp': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_GRP,
|
||||
'new': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_GRP,
|
||||
'nch': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_GRP,
|
||||
'chn': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_GRP,
|
||||
'usr': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_P2P,
|
||||
'sys': _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_SYS
|
||||
};
|
||||
return types[typeof name == 'string' ? name.substring(0, 3) : 'xxx'];
|
||||
}
|
||||
static isMeTopicName(name) {
|
||||
return Topic.topicType(name) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME;
|
||||
return Topic.topicType(name) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME;
|
||||
}
|
||||
static isGroupTopicName(name) {
|
||||
return Topic.topicType(name) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_GRP;
|
||||
return Topic.topicType(name) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_GRP;
|
||||
}
|
||||
static isP2PTopicName(name) {
|
||||
return Topic.topicType(name) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_P2P;
|
||||
return Topic.topicType(name) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_P2P;
|
||||
}
|
||||
static isCommTopicName(name) {
|
||||
return Topic.isP2PTopicName(name) || Topic.isGroupTopicName(name);
|
||||
}
|
||||
static isNewGroupTopicName(name) {
|
||||
return typeof name == 'string' && (name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_NEW || name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_NEW_CHAN);
|
||||
return typeof name == 'string' && (name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_NEW || name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_NEW_CHAN);
|
||||
}
|
||||
static isChannelTopicName(name) {
|
||||
return typeof name == 'string' && (name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_CHAN || name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_NEW_CHAN);
|
||||
return typeof name == 'string' && (name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_CHAN || name.substring(0, 3) == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_NEW_CHAN);
|
||||
}
|
||||
isSubscribed() {
|
||||
return this._attached;
|
||||
@@ -3473,7 +3485,7 @@ class Topic {
|
||||
if (this._deleted) {
|
||||
return Promise.reject(new Error("Conversation deleted"));
|
||||
}
|
||||
return this._tinode.subscribe(this.name || _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_NEW, getParams, setParams).then(ctrl => {
|
||||
return this._tinode.subscribe(this.name || _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_NEW, getParams, setParams).then(ctrl => {
|
||||
if (ctrl.code >= 300) {
|
||||
return ctrl;
|
||||
}
|
||||
@@ -3489,7 +3501,7 @@ class Topic {
|
||||
this._cachePutSelf();
|
||||
this.created = ctrl.ts;
|
||||
this.updated = ctrl.ts;
|
||||
if (this.name != _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME && this.name != _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_FND) {
|
||||
if (this.name != _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME && this.name != _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_FND) {
|
||||
const me = this._tinode.getMeTopic();
|
||||
if (me.onMetaSub) {
|
||||
me.onMetaSub(this);
|
||||
@@ -3522,9 +3534,9 @@ class Topic {
|
||||
pub._sending = true;
|
||||
pub._failed = false;
|
||||
let attachments = null;
|
||||
if (_drafty_js__WEBPACK_IMPORTED_MODULE_3___default().hasEntities(pub.content)) {
|
||||
if (_drafty_js__WEBPACK_IMPORTED_MODULE_4___default().hasEntities(pub.content)) {
|
||||
attachments = [];
|
||||
_drafty_js__WEBPACK_IMPORTED_MODULE_3___default().entities(pub.content, data => {
|
||||
_drafty_js__WEBPACK_IMPORTED_MODULE_4___default().entities(pub.content, data => {
|
||||
if (data && data.ref) {
|
||||
attachments.push(data.ref);
|
||||
}
|
||||
@@ -3575,6 +3587,7 @@ class Topic {
|
||||
this._tinode.logger("WARNING: Message draft rejected", err);
|
||||
pub._sending = false;
|
||||
pub._failed = true;
|
||||
pub._fatal = err instanceof _comm_error_js__WEBPACK_IMPORTED_MODULE_2__["default"] ? err.code >= 400 && err.code < 500 : false;
|
||||
if (this.onData) {
|
||||
this.onData();
|
||||
}
|
||||
@@ -3630,7 +3643,7 @@ class Topic {
|
||||
}
|
||||
setMeta(params) {
|
||||
if (params.tags) {
|
||||
params.tags = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.normalizeArray)(params.tags);
|
||||
params.tags = (0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.normalizeArray)(params.tags);
|
||||
}
|
||||
return this._tinode.setMeta(this.name, params).then(ctrl => {
|
||||
if (ctrl && ctrl.code >= 300) {
|
||||
@@ -3692,7 +3705,7 @@ class Topic {
|
||||
return this.setMeta({
|
||||
desc: {
|
||||
private: {
|
||||
arch: arch ? true : _config_js__WEBPACK_IMPORTED_MODULE_2__.DEL_CHAR
|
||||
arch: arch ? true : _config_js__WEBPACK_IMPORTED_MODULE_3__.DEL_CHAR
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -3711,8 +3724,8 @@ class Topic {
|
||||
return false;
|
||||
});
|
||||
let tosend = ranges.reduce((out, r) => {
|
||||
if (r.low < _config_js__WEBPACK_IMPORTED_MODULE_2__.LOCAL_SEQID) {
|
||||
if (!r.hi || r.hi < _config_js__WEBPACK_IMPORTED_MODULE_2__.LOCAL_SEQID) {
|
||||
if (r.low < _config_js__WEBPACK_IMPORTED_MODULE_3__.LOCAL_SEQID) {
|
||||
if (!r.hi || r.hi < _config_js__WEBPACK_IMPORTED_MODULE_3__.LOCAL_SEQID) {
|
||||
out.push(r);
|
||||
} else {
|
||||
out.push({
|
||||
@@ -4001,7 +4014,7 @@ class Topic {
|
||||
if (!callback) {
|
||||
throw new Error("Callback must be provided");
|
||||
}
|
||||
this.messages(callback, _config_js__WEBPACK_IMPORTED_MODULE_2__.LOCAL_SEQID, undefined, context);
|
||||
this.messages(callback, _config_js__WEBPACK_IMPORTED_MODULE_3__.LOCAL_SEQID, undefined, context);
|
||||
}
|
||||
msgReceiptCount(what, seq) {
|
||||
let count = 0;
|
||||
@@ -4069,7 +4082,7 @@ class Topic {
|
||||
if (idx >= 0) {
|
||||
const msg = this._messages.getAt(idx);
|
||||
const status = this.msgStatus(msg);
|
||||
if (status == _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_QUEUED || status == _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_FAILED) {
|
||||
if (status == _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_QUEUED || status == _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_FAILED || status == _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_FATAL) {
|
||||
this._tinode._db.remMessages(this.name, seqId);
|
||||
msg._cancelled = true;
|
||||
this._messages.delAt(idx);
|
||||
@@ -4094,7 +4107,7 @@ class Topic {
|
||||
return this.defacs;
|
||||
}
|
||||
startMetaQuery() {
|
||||
return new _meta_builder_js__WEBPACK_IMPORTED_MODULE_4__["default"](this);
|
||||
return new _meta_builder_js__WEBPACK_IMPORTED_MODULE_5__["default"](this);
|
||||
}
|
||||
isArchived() {
|
||||
return this.private && !!this.private.arch;
|
||||
@@ -4115,23 +4128,25 @@ class Topic {
|
||||
return Topic.isCommTopicName(this.name);
|
||||
}
|
||||
msgStatus(msg, upd) {
|
||||
let status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_NONE;
|
||||
let status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_NONE;
|
||||
if (this._tinode.isMe(msg.from)) {
|
||||
if (msg._sending) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_SENDING;
|
||||
} else if (msg._failed || msg._cancelled) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_FAILED;
|
||||
} else if (msg.seq >= _config_js__WEBPACK_IMPORTED_MODULE_2__.LOCAL_SEQID) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_QUEUED;
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_SENDING;
|
||||
} else if (msg._fatal || msg._cancelled) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_FATAL;
|
||||
} else if (msg._failed) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_FAILED;
|
||||
} else if (msg.seq >= _config_js__WEBPACK_IMPORTED_MODULE_3__.LOCAL_SEQID) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_QUEUED;
|
||||
} else if (this.msgReadCount(msg.seq) > 0) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_READ;
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_READ;
|
||||
} else if (this.msgRecvCount(msg.seq) > 0) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_RECEIVED;
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_RECEIVED;
|
||||
} else if (msg.seq > 0) {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_SENT;
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_SENT;
|
||||
}
|
||||
} else {
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_2__.MESSAGE_STATUS_TO_ME;
|
||||
status = _config_js__WEBPACK_IMPORTED_MODULE_3__.MESSAGE_STATUS_TO_ME;
|
||||
}
|
||||
if (upd && msg._status != status) {
|
||||
msg._status = status;
|
||||
@@ -4180,14 +4195,14 @@ class Topic {
|
||||
this._recvNotificationTimer = setTimeout(_ => {
|
||||
this._recvNotificationTimer = null;
|
||||
this.noteRecv(this._maxSeq);
|
||||
}, _config_js__WEBPACK_IMPORTED_MODULE_2__.RECV_TIMEOUT);
|
||||
}, _config_js__WEBPACK_IMPORTED_MODULE_3__.RECV_TIMEOUT);
|
||||
}
|
||||
if (data.seq < this._minSeq || this._minSeq == 0) {
|
||||
this._minSeq = data.seq;
|
||||
}
|
||||
const outgoing = !this.isChannelType() && !data.from || this._tinode.isMe(data.from);
|
||||
if (data.head && data.head.webrtc && data.head.mime == _drafty_js__WEBPACK_IMPORTED_MODULE_3___default().getContentType() && data.content) {
|
||||
data.content = _drafty_js__WEBPACK_IMPORTED_MODULE_3___default().updateVideoCall(data.content, {
|
||||
if (data.head && data.head.webrtc && data.head.mime == _drafty_js__WEBPACK_IMPORTED_MODULE_4___default().getContentType() && data.content) {
|
||||
data.content = _drafty_js__WEBPACK_IMPORTED_MODULE_4___default().updateVideoCall(data.content, {
|
||||
state: data.head.webrtc,
|
||||
duration: data.head['webrtc-duration'],
|
||||
incoming: !outgoing
|
||||
@@ -4319,9 +4334,9 @@ class Topic {
|
||||
delete desc.defacs;
|
||||
this._tinode._db.updUser(this.name, desc.public);
|
||||
}
|
||||
(0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.mergeObj)(this, desc);
|
||||
(0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.mergeObj)(this, desc);
|
||||
this._tinode._db.updTopic(this);
|
||||
if (this.name !== _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME && !desc._noForwarding) {
|
||||
if (this.name !== _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME && !desc._noForwarding) {
|
||||
const me = this._tinode.getMeTopic();
|
||||
if (me.onMetaSub) {
|
||||
me.onMetaSub(this);
|
||||
@@ -4362,7 +4377,7 @@ class Topic {
|
||||
}
|
||||
}
|
||||
_processMetaTags(tags) {
|
||||
if (tags.length == 1 && tags[0] == _config_js__WEBPACK_IMPORTED_MODULE_2__.DEL_CHAR) {
|
||||
if (tags.length == 1 && tags[0] == _config_js__WEBPACK_IMPORTED_MODULE_3__.DEL_CHAR) {
|
||||
tags = [];
|
||||
}
|
||||
this._tags = tags;
|
||||
@@ -4419,7 +4434,7 @@ class Topic {
|
||||
me._routePres({
|
||||
_noForwarding: true,
|
||||
what: 'gone',
|
||||
topic: _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME,
|
||||
topic: _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME,
|
||||
src: this.name
|
||||
});
|
||||
}
|
||||
@@ -4429,9 +4444,9 @@ class Topic {
|
||||
}
|
||||
_updateCachedUser(uid, obj) {
|
||||
let cached = this._cacheGetUser(uid);
|
||||
cached = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.mergeObj)(cached || {}, obj);
|
||||
cached = (0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.mergeObj)(cached || {}, obj);
|
||||
this._cachePutUser(uid, cached);
|
||||
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.mergeToCache)(this._users, uid, cached);
|
||||
return (0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.mergeToCache)(this._users, uid, cached);
|
||||
}
|
||||
_getQueuedSeqId() {
|
||||
return this._queuedSeqId++;
|
||||
@@ -4445,7 +4460,7 @@ class Topic {
|
||||
return db.readMessages(this.name, {
|
||||
since: since,
|
||||
before: before,
|
||||
limit: limit || _config_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_MESSAGES_PAGE
|
||||
limit: limit || _config_js__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_MESSAGES_PAGE
|
||||
}).then(msgs => {
|
||||
msgs.forEach(data => {
|
||||
if (data.seq > this._maxSeq) {
|
||||
@@ -4473,7 +4488,7 @@ class Topic {
|
||||
}
|
||||
class TopicMe extends Topic {
|
||||
constructor(callbacks) {
|
||||
super(_config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME, callbacks);
|
||||
super(_config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME, callbacks);
|
||||
_defineProperty(this, "onContactUpdate", void 0);
|
||||
if (callbacks) {
|
||||
this.onContactUpdate = callbacks.onContactUpdate;
|
||||
@@ -4481,7 +4496,7 @@ class TopicMe extends Topic {
|
||||
}
|
||||
_processMetaDesc(desc) {
|
||||
const turnOff = desc.acs && !desc.acs.isPresencer() && this.acs && this.acs.isPresencer();
|
||||
(0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.mergeObj)(this, desc);
|
||||
(0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.mergeObj)(this, desc);
|
||||
this._tinode._db.updTopic(this);
|
||||
this._updateCachedUser(this._tinode._myUID, desc);
|
||||
if (turnOff) {
|
||||
@@ -4503,7 +4518,7 @@ class TopicMe extends Topic {
|
||||
let updateCount = 0;
|
||||
subs.forEach(sub => {
|
||||
const topicName = sub.topic;
|
||||
if (topicName == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_FND || topicName == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME) {
|
||||
if (topicName == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_FND || topicName == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME) {
|
||||
return;
|
||||
}
|
||||
sub.online = !!sub.online;
|
||||
@@ -4523,7 +4538,7 @@ class TopicMe extends Topic {
|
||||
if (topic._new) {
|
||||
delete topic._new;
|
||||
}
|
||||
cont = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.mergeObj)(topic, sub);
|
||||
cont = (0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.mergeObj)(topic, sub);
|
||||
this._tinode._db.updTopic(cont);
|
||||
if (Topic.isP2PTopicName(topicName)) {
|
||||
this._cachePutUser(topicName, cont);
|
||||
@@ -4548,7 +4563,7 @@ class TopicMe extends Topic {
|
||||
}
|
||||
}
|
||||
_processMetaCreds(creds, upd) {
|
||||
if (creds.length == 1 && creds[0] == _config_js__WEBPACK_IMPORTED_MODULE_2__.DEL_CHAR) {
|
||||
if (creds.length == 1 && creds[0] == _config_js__WEBPACK_IMPORTED_MODULE_3__.DEL_CHAR) {
|
||||
creds = [];
|
||||
}
|
||||
if (upd) {
|
||||
@@ -4591,7 +4606,7 @@ class TopicMe extends Topic {
|
||||
this._resetSub();
|
||||
return;
|
||||
}
|
||||
if (pres.what == 'upd' && pres.src == _config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_ME) {
|
||||
if (pres.what == 'upd' && pres.src == _config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_ME) {
|
||||
this.getMeta(this.startMetaQuery().withDesc().build());
|
||||
return;
|
||||
}
|
||||
@@ -4731,7 +4746,7 @@ class TopicMe extends Topic {
|
||||
}
|
||||
class TopicFnd extends Topic {
|
||||
constructor(callbacks) {
|
||||
super(_config_js__WEBPACK_IMPORTED_MODULE_2__.TOPIC_FND, callbacks);
|
||||
super(_config_js__WEBPACK_IMPORTED_MODULE_3__.TOPIC_FND, callbacks);
|
||||
_defineProperty(this, "_contacts", {});
|
||||
}
|
||||
_processMetaSub(subs) {
|
||||
@@ -4740,7 +4755,7 @@ class TopicFnd extends Topic {
|
||||
for (let idx in subs) {
|
||||
let sub = subs[idx];
|
||||
const indexBy = sub.topic ? sub.topic : sub.user;
|
||||
sub = (0,_utils_js__WEBPACK_IMPORTED_MODULE_5__.mergeToCache)(this._contacts, indexBy, sub);
|
||||
sub = (0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.mergeToCache)(this._contacts, indexBy, sub);
|
||||
updateCount++;
|
||||
if (this.onMetaSub) {
|
||||
this.onMetaSub(sub);
|
||||
@@ -6275,6 +6290,7 @@ Tinode.MESSAGE_STATUS_NONE = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STA
|
||||
Tinode.MESSAGE_STATUS_QUEUED = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_QUEUED;
|
||||
Tinode.MESSAGE_STATUS_SENDING = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_SENDING;
|
||||
Tinode.MESSAGE_STATUS_FAILED = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_FAILED;
|
||||
Tinode.MESSAGE_STATUS_FATAL = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_FATAL;
|
||||
Tinode.MESSAGE_STATUS_SENT = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_SENT;
|
||||
Tinode.MESSAGE_STATUS_RECEIVED = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_RECEIVED;
|
||||
Tinode.MESSAGE_STATUS_READ = _config_js__WEBPACK_IMPORTED_MODULE_1__.MESSAGE_STATUS_READ;
|
||||
@@ -6284,6 +6300,7 @@ Tinode.MAX_MESSAGE_SIZE = 'maxMessageSize';
|
||||
Tinode.MAX_SUBSCRIBER_COUNT = 'maxSubscriberCount';
|
||||
Tinode.MAX_TAG_COUNT = 'maxTagCount';
|
||||
Tinode.MAX_FILE_UPLOAD_SIZE = 'maxFileUploadSize';
|
||||
Tinode.REQ_CRED_VALIDATORS = 'reqCred';
|
||||
})();
|
||||
|
||||
/******/ return __webpack_exports__;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user