Restrict sending messages in a pad chat to editors only

This commit is contained in:
yflory committed 2018-12-10 17:47:47 +01:00
1 parent a2e28e6e25
commit d88dee9a83
7 files changed
+59 -22

No files matched your search

+4 -3
View File
@@ -43,6 +43,7 @@ define([
var sframeChan = common.getSframeChannel();
var metadataMgr = common.getMetadataMgr();
var origin = metadataMgr.getPrivateData().origin;
var readOnly = metadataMgr.getPrivateData().readOnly;
var isApp = typeof(toolbar) !== "undefined";
@@ -358,7 +359,7 @@ define([
}, function (e) {
if (e) {
// failed to send
return void console.error('failed to send');
return void console.error('failed to send', e);
}
input.value = '';
sending = false;
@@ -406,9 +407,9 @@ define([
'data-user': data.isFriendChat && curvePublic
}, [
header,
tips,
readOnly ? undefined : tips,
messages,
h('div.cp-app-contacts-input', [
readOnly ? undefined : h('div.cp-app-contacts-input', [
input,
sendButton,
]),