forwarding from channels and some other minor fixes

This commit is contained in:
or-else
2021-10-05 16:42:10 -07:00
parent 8f672405bc
commit fb2b4b337b
8 changed files with 37 additions and 19 deletions
+5 -2
View File
@@ -71,13 +71,16 @@ class BaseChatMessage extends React.PureComponent {
handleContextClick(e) {
e.preventDefault();
e.stopPropagation();
const menuItems = this.props.received == Tinode.MESSAGE_STATUS_FAILED ? ['menu_item_send_retry'] : [];
const menuItems = [];
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 &&
this.props.received < Tinode.MESSAGE_STATUS_DEL_RANGE) {
menuItems.push('menu_item_reply');
menuItems.push('menu_item_forward');
}
menuItems.push('menu_item_forward');
this.props.showContextMenu({
seq: this.props.seq,
-1
View File
@@ -52,7 +52,6 @@ export default class ForwardDialog extends React.Component {
let contacts = this.state.query != null ? this.props.searchResults : this.props.contacts;
// Filter out contacts without a 'W' or 'J' permissions as well as the current topic.
contacts = contacts.filter((c) => {
console.log(c.name, this.props.topicSelected);
return (c.name != this.props.topicSelected) && c.acs.isJoiner() && c.acs.isWriter();
});