@subiz/widget-v4 4.1.170 → 4.1.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled_src/chatbox/ChatButton.js +1 -0
- package/compiled_src/chatbox/main.js +13 -3
- package/compiled_src/plugin.js +1 -0
- package/compiled_src/store/store.js +9 -9
- package/dist/{198a92fcacc.app.js → 198b082f7d0.app.js} +1 -1
- package/dist/{198a92fcacc.chat.html → 198b082f7d0.chat.html} +1 -1
- package/dist/{198a92fcacc.chat.js → 198b082f7d0.chat.js} +1 -1
- package/dist/{198a92fcacc.form.html → 198b082f7d0.form.html} +1 -1
- package/dist/{198a92fcacc.form.js → 198b082f7d0.form.js} +1 -1
- package/dist/{198a92fcacc.index.html → 198b082f7d0.index.html} +1 -1
- package/dist/{198a92fcacc.library.html → 198b082f7d0.library.html} +1 -1
- package/dist/{198a92fcacc.library.js → 198b082f7d0.library.js} +1 -1
- package/dist/{198a92fcacc.preview.html → 198b082f7d0.preview.html} +1 -1
- package/dist/{198a92fcacc.preview.js → 198b082f7d0.preview.js} +1 -1
- package/dist/{198a92fcacc.webview.js → 198b082f7d0.webview.js} +1 -1
- package/dist/HASH +1 -1
- package/dist/screenshoot.js +5 -2
- package/package.json +2 -2
- package/src/chatbox/ChatButton.js +3 -0
- package/src/chatbox/main.js +13 -4
- package/src/plugin.js +1 -0
- package/src/store/store.js +11 -12
- /package/dist/{198a92fcacc.127.js → 198b082f7d0.127.js} +0 -0
- /package/dist/{198a92fcacc.132.js → 198b082f7d0.132.js} +0 -0
- /package/dist/{198a92fcacc.185.js → 198b082f7d0.185.js} +0 -0
- /package/dist/{198a92fcacc.27.js → 198b082f7d0.27.js} +0 -0
- /package/dist/{198a92fcacc.278.js → 198b082f7d0.278.js} +0 -0
- /package/dist/{198a92fcacc.339.js → 198b082f7d0.339.js} +0 -0
- /package/dist/{198a92fcacc.459.js → 198b082f7d0.459.js} +0 -0
- /package/dist/{198a92fcacc.490.js → 198b082f7d0.490.js} +0 -0
- /package/dist/{198a92fcacc.74.js → 198b082f7d0.74.js} +0 -0
- /package/dist/{198a92fcacc.997.js → 198b082f7d0.997.js} +0 -0
|
@@ -252,6 +252,7 @@ class ChatButton extends _common.Com {
|
|
|
252
252
|
this._buttonLoaded = true;
|
|
253
253
|
}
|
|
254
254
|
renderButton() {
|
|
255
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_button = _index.default.Date.now();
|
|
255
256
|
let accountSetting = this.props.plugin.chatbox;
|
|
256
257
|
accountSetting = this.fixMissingSetting(accountSetting);
|
|
257
258
|
let imgsrc = _index.default.get(accountSetting, 'desktop_button.background_image_url') || _index.default.get(accountSetting, 'desktop_button.background_mask_url') || defaultBubble;
|
|
@@ -68,9 +68,19 @@ class Main extends _common.Com {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
if (!this.state.cssready)
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
if (!this.state.cssready) {
|
|
72
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_css_not_ready = _index.default.Date.now();
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
if (_index.default.isUserBanned(this.props.store.matchUser())) {
|
|
76
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_user_is_banned = _index.default.Date.now();
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
if (!this.props.t) {
|
|
80
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_no_t = _index.default.Date.now();
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_main = _index.default.Date.now();
|
|
74
84
|
return (0, _preact.h)("div", {
|
|
75
85
|
class: this.props.store.isMobile() ? 'mobile' : 'desktop'
|
|
76
86
|
}, (0, _preact.h)(_ChatButton.default, {
|
package/compiled_src/plugin.js
CHANGED
|
@@ -225,6 +225,7 @@ class PluginMgr {
|
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
227
|
let pluginM = this.lib.store.matchPlugin();
|
|
228
|
+
if (typeof sbz_info != 'undefined') sbz_info['plugins'] = pluginM;
|
|
228
229
|
let foundchatbox = false;
|
|
229
230
|
_index.default.each(pluginM, conf => {
|
|
230
231
|
if (conf.type === 'chatbox') {
|
|
@@ -833,17 +833,17 @@ class Store {
|
|
|
833
833
|
this.chain.put(cid, oldev.id, _index.default.getMs(oldev.created), oldev);
|
|
834
834
|
this.pubsub.publish('events', oldev);
|
|
835
835
|
}
|
|
836
|
-
if (ev.type === 'message_sent') {
|
|
837
|
-
let idemkey = _index.default.get(ev, 'data.message.idempotency_key');
|
|
838
|
-
let found = _index.default.find(this.listEvents(cid), oldev => oldev.id === idemkey);
|
|
839
|
-
if (found) {
|
|
840
|
-
this.chain.del(cid, found.id);
|
|
841
|
-
ev.created = found.created;
|
|
842
|
-
}
|
|
843
|
-
convo.last_message_sent = ev;
|
|
844
|
-
}
|
|
845
836
|
if (ev.type !== 'message_pong' && ev.type !== 'conversation_typing') {
|
|
846
837
|
this.chain.put(cid, ev.id, _index.default.getMs(ev.created), ev);
|
|
838
|
+
if (ev.type === 'message_sent') {
|
|
839
|
+
let idemkey = _index.default.get(ev, 'data.message.idempotency_key');
|
|
840
|
+
let found = _index.default.find(this.listEvents(cid), oldev => oldev.id === idemkey);
|
|
841
|
+
if (found) {
|
|
842
|
+
this.chain.del(cid, found.id);
|
|
843
|
+
ev.created = found.created;
|
|
844
|
+
}
|
|
845
|
+
convo.last_message_sent = ev;
|
|
846
|
+
}
|
|
847
847
|
}
|
|
848
848
|
this._setConvo(convo);
|
|
849
849
|
this.pubsub.publish('account');
|