2020-06-15 19:35:45 +00:00
|
|
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { Alert, Clipboard, Share } from 'react-native';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
import RocketChat from '../../lib/rocketchat';
|
|
|
|
import database from '../../lib/database';
|
|
|
|
import I18n from '../../i18n';
|
2020-07-30 19:51:13 +00:00
|
|
|
import log, { logEvent } from '../../utils/log';
|
2020-06-15 19:35:45 +00:00
|
|
|
import Navigation from '../../lib/Navigation';
|
|
|
|
import { getMessageTranslation } from '../message/utils';
|
|
|
|
import { LISTENER } from '../Toast';
|
|
|
|
import EventEmitter from '../../utils/events';
|
|
|
|
import { showConfirmationAlert } from '../../utils/info';
|
|
|
|
import { useActionSheet } from '../ActionSheet';
|
|
|
|
import Header, { HEADER_HEIGHT } from './Header';
|
2020-07-30 19:51:13 +00:00
|
|
|
import events from '../../utils/log/events';
|
2020-06-15 19:35:45 +00:00
|
|
|
|
|
|
|
const MessageActions = React.memo(forwardRef(({
|
|
|
|
room,
|
|
|
|
tmid,
|
|
|
|
user,
|
|
|
|
editInit,
|
|
|
|
reactionInit,
|
|
|
|
onReactionPress,
|
|
|
|
replyInit,
|
|
|
|
isReadOnly,
|
|
|
|
server,
|
|
|
|
Message_AllowDeleting,
|
|
|
|
Message_AllowDeleting_BlockDeleteInMinutes,
|
|
|
|
Message_AllowEditing,
|
|
|
|
Message_AllowEditing_BlockEditInMinutes,
|
|
|
|
Message_AllowPinning,
|
|
|
|
Message_AllowStarring,
|
2020-07-08 20:45:13 +00:00
|
|
|
Message_Read_Receipt_Store_Users,
|
2021-02-25 16:41:44 +00:00
|
|
|
isMasterDetail,
|
|
|
|
editMessagePermission,
|
|
|
|
deleteMessagePermission,
|
|
|
|
forceDeleteMessagePermission,
|
|
|
|
pinMessagePermission
|
2020-06-15 19:35:45 +00:00
|
|
|
}, ref) => {
|
|
|
|
let permissions = {};
|
|
|
|
const { showActionSheet, hideActionSheet } = useActionSheet();
|
|
|
|
|
|
|
|
const getPermissions = async() => {
|
|
|
|
try {
|
2021-02-25 16:41:44 +00:00
|
|
|
const permission = [editMessagePermission, deleteMessagePermission, forceDeleteMessagePermission, pinMessagePermission];
|
2020-06-15 19:35:45 +00:00
|
|
|
const result = await RocketChat.hasPermission(permission, room.rid);
|
|
|
|
permissions = {
|
2021-02-25 16:41:44 +00:00
|
|
|
hasEditPermission: result[0],
|
|
|
|
hasDeletePermission: result[1],
|
|
|
|
hasForceDeletePermission: result[2],
|
|
|
|
hasPinPermission: result[3]
|
2020-06-15 19:35:45 +00:00
|
|
|
};
|
|
|
|
} catch {
|
|
|
|
// Do nothing
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const isOwn = message => message.u && message.u._id === user.id;
|
|
|
|
|
|
|
|
const allowEdit = (message) => {
|
|
|
|
if (isReadOnly) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
const editOwn = isOwn(message);
|
|
|
|
|
|
|
|
if (!(permissions.hasEditPermission || (Message_AllowEditing && editOwn))) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
const blockEditInMinutes = Message_AllowEditing_BlockEditInMinutes;
|
|
|
|
if (blockEditInMinutes) {
|
|
|
|
let msgTs;
|
|
|
|
if (message.ts != null) {
|
|
|
|
msgTs = moment(message.ts);
|
|
|
|
}
|
|
|
|
let currentTsDiff;
|
|
|
|
if (msgTs != null) {
|
|
|
|
currentTsDiff = moment().diff(msgTs, 'minutes');
|
|
|
|
}
|
|
|
|
return currentTsDiff < blockEditInMinutes;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
|
|
|
const allowDelete = (message) => {
|
|
|
|
if (isReadOnly) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Prevent from deleting thread start message when positioned inside the thread
|
|
|
|
if (tmid === message.id) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
const deleteOwn = isOwn(message);
|
|
|
|
if (!(permissions.hasDeletePermission || (Message_AllowDeleting && deleteOwn) || permissions.hasForceDeletePermission)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (permissions.hasForceDeletePermission) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
const blockDeleteInMinutes = Message_AllowDeleting_BlockDeleteInMinutes;
|
|
|
|
if (blockDeleteInMinutes != null && blockDeleteInMinutes !== 0) {
|
|
|
|
let msgTs;
|
|
|
|
if (message.ts != null) {
|
|
|
|
msgTs = moment(message.ts);
|
|
|
|
}
|
|
|
|
let currentTsDiff;
|
|
|
|
if (msgTs != null) {
|
|
|
|
currentTsDiff = moment().diff(msgTs, 'minutes');
|
|
|
|
}
|
|
|
|
return currentTsDiff < blockDeleteInMinutes;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
|
|
|
const getPermalink = message => RocketChat.getPermalinkMessage(message);
|
|
|
|
|
2020-07-30 19:51:13 +00:00
|
|
|
const handleReply = (message) => {
|
|
|
|
logEvent(events.ROOM_MSG_ACTION_REPLY);
|
|
|
|
replyInit(message, true);
|
|
|
|
};
|
2020-06-15 19:35:45 +00:00
|
|
|
|
2020-07-30 19:51:13 +00:00
|
|
|
const handleEdit = (message) => {
|
|
|
|
logEvent(events.ROOM_MSG_ACTION_EDIT);
|
|
|
|
editInit(message);
|
|
|
|
};
|
2020-06-15 19:35:45 +00:00
|
|
|
|
|
|
|
const handleCreateDiscussion = (message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_DISCUSSION);
|
2020-07-08 20:57:05 +00:00
|
|
|
const params = { message, channel: room, showCloseModal: true };
|
|
|
|
if (isMasterDetail) {
|
|
|
|
Navigation.navigate('ModalStackNavigator', { screen: 'CreateDiscussionView', params });
|
|
|
|
} else {
|
|
|
|
Navigation.navigate('NewMessageStackNavigator', { screen: 'CreateDiscussionView', params });
|
|
|
|
}
|
2020-06-15 19:35:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const handleUnread = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_UNREAD);
|
2020-06-15 19:35:45 +00:00
|
|
|
const { id: messageId, ts } = message;
|
|
|
|
const { rid } = room;
|
|
|
|
try {
|
|
|
|
const db = database.active;
|
|
|
|
const result = await RocketChat.markAsUnread({ messageId });
|
|
|
|
if (result.success) {
|
2021-02-26 16:25:51 +00:00
|
|
|
const subCollection = db.get('subscriptions');
|
2020-06-15 19:35:45 +00:00
|
|
|
const subRecord = await subCollection.find(rid);
|
|
|
|
await db.action(async() => {
|
|
|
|
try {
|
|
|
|
await subRecord.update(sub => sub.lastOpen = ts);
|
|
|
|
} catch {
|
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
});
|
|
|
|
Navigation.navigate('RoomsListView');
|
|
|
|
}
|
|
|
|
} catch (e) {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_UNREAD_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const handlePermalink = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_PERMALINK);
|
2020-06-15 19:35:45 +00:00
|
|
|
try {
|
|
|
|
const permalink = await getPermalink(message);
|
|
|
|
Clipboard.setString(permalink);
|
|
|
|
EventEmitter.emit(LISTENER, { message: I18n.t('Permalink_copied_to_clipboard') });
|
|
|
|
} catch {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_PERMALINK_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleCopy = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_COPY);
|
2021-02-23 17:24:05 +00:00
|
|
|
await Clipboard.setString(message?.attachments?.[0]?.description || message.msg);
|
2020-06-15 19:35:45 +00:00
|
|
|
EventEmitter.emit(LISTENER, { message: I18n.t('Copied_to_clipboard') });
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleShare = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_SHARE);
|
2020-06-15 19:35:45 +00:00
|
|
|
try {
|
|
|
|
const permalink = await getPermalink(message);
|
|
|
|
Share.share({ message: permalink });
|
|
|
|
} catch {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_SHARE_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-07-30 19:51:13 +00:00
|
|
|
const handleQuote = (message) => {
|
|
|
|
logEvent(events.ROOM_MSG_ACTION_QUOTE);
|
|
|
|
replyInit(message, false);
|
|
|
|
};
|
2020-06-15 19:35:45 +00:00
|
|
|
|
|
|
|
const handleStar = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(message.starred ? events.ROOM_MSG_ACTION_UNSTAR : events.ROOM_MSG_ACTION_STAR);
|
2020-06-15 19:35:45 +00:00
|
|
|
try {
|
|
|
|
await RocketChat.toggleStarMessage(message.id, message.starred);
|
|
|
|
EventEmitter.emit(LISTENER, { message: message.starred ? I18n.t('Message_unstarred') : I18n.t('Message_starred') });
|
|
|
|
} catch (e) {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_STAR_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const handlePin = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_PIN);
|
2020-06-15 19:35:45 +00:00
|
|
|
try {
|
|
|
|
await RocketChat.togglePinMessage(message.id, message.pinned);
|
|
|
|
} catch (e) {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_PIN_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleReaction = (shortname, message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_REACTION);
|
2020-06-15 19:35:45 +00:00
|
|
|
if (shortname) {
|
|
|
|
onReactionPress(shortname, message.id);
|
|
|
|
} else {
|
|
|
|
reactionInit(message);
|
|
|
|
}
|
|
|
|
// close actionSheet when click at header
|
|
|
|
hideActionSheet();
|
|
|
|
};
|
|
|
|
|
2020-07-17 17:13:44 +00:00
|
|
|
const handleReadReceipt = (message) => {
|
|
|
|
if (isMasterDetail) {
|
|
|
|
Navigation.navigate('ModalStackNavigator', { screen: 'ReadReceiptsView', params: { messageId: message.id } });
|
|
|
|
} else {
|
|
|
|
Navigation.navigate('ReadReceiptsView', { messageId: message.id });
|
|
|
|
}
|
|
|
|
};
|
2020-06-15 19:35:45 +00:00
|
|
|
|
|
|
|
const handleToggleTranslation = async(message) => {
|
|
|
|
try {
|
|
|
|
const db = database.active;
|
|
|
|
await db.action(async() => {
|
|
|
|
await message.update((m) => {
|
|
|
|
m.autoTranslate = !m.autoTranslate;
|
|
|
|
m._updatedAt = new Date();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const translatedMessage = getMessageTranslation(message, room.autoTranslateLanguage);
|
|
|
|
if (!translatedMessage) {
|
|
|
|
const m = {
|
|
|
|
_id: message.id,
|
|
|
|
rid: message.subscription.id,
|
|
|
|
u: message.u,
|
|
|
|
msg: message.msg
|
|
|
|
};
|
|
|
|
await RocketChat.translateMessage(m, room.autoTranslateLanguage);
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleReport = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_REPORT);
|
2020-06-15 19:35:45 +00:00
|
|
|
try {
|
|
|
|
await RocketChat.reportMessage(message.id);
|
|
|
|
Alert.alert(I18n.t('Message_Reported'));
|
|
|
|
} catch (e) {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_REPORT_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleDelete = (message) => {
|
|
|
|
showConfirmationAlert({
|
|
|
|
message: I18n.t('You_will_not_be_able_to_recover_this_message'),
|
2020-08-25 20:04:18 +00:00
|
|
|
confirmationText: I18n.t('Delete'),
|
2020-06-15 19:35:45 +00:00
|
|
|
onPress: async() => {
|
|
|
|
try {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_DELETE);
|
2020-06-15 19:35:45 +00:00
|
|
|
await RocketChat.deleteMessage(message.id, message.subscription.id);
|
|
|
|
} catch (e) {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_MSG_ACTION_DELETE_F);
|
2020-06-15 19:35:45 +00:00
|
|
|
log(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
const getOptions = (message) => {
|
|
|
|
let options = [];
|
|
|
|
|
|
|
|
// Reply
|
|
|
|
if (!isReadOnly) {
|
|
|
|
options = [{
|
|
|
|
title: I18n.t('Reply_in_Thread'),
|
|
|
|
icon: 'threads',
|
|
|
|
onPress: () => handleReply(message)
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Quote
|
|
|
|
if (!isReadOnly) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Quote'),
|
|
|
|
icon: 'quote',
|
|
|
|
onPress: () => handleQuote(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Edit
|
|
|
|
if (allowEdit(message)) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Edit'),
|
|
|
|
icon: 'edit',
|
|
|
|
onPress: () => handleEdit(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Permalink
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Permalink'),
|
|
|
|
icon: 'link',
|
|
|
|
onPress: () => handlePermalink(message)
|
|
|
|
});
|
|
|
|
|
|
|
|
// Create Discussion
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Start_a_Discussion'),
|
2020-07-29 21:02:51 +00:00
|
|
|
icon: 'discussions',
|
2020-06-15 19:35:45 +00:00
|
|
|
onPress: () => handleCreateDiscussion(message)
|
|
|
|
});
|
|
|
|
|
|
|
|
// Mark as unread
|
|
|
|
if (message.u && message.u._id !== user.id) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Mark_unread'),
|
|
|
|
icon: 'flag',
|
|
|
|
onPress: () => handleUnread(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Copy
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Copy'),
|
|
|
|
icon: 'copy',
|
|
|
|
onPress: () => handleCopy(message)
|
|
|
|
});
|
|
|
|
|
|
|
|
// Share
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Share'),
|
|
|
|
icon: 'share',
|
|
|
|
onPress: () => handleShare(message)
|
|
|
|
});
|
|
|
|
|
|
|
|
// Star
|
|
|
|
if (Message_AllowStarring) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t(message.starred ? 'Unstar' : 'Star'),
|
|
|
|
icon: message.starred ? 'star-filled' : 'star',
|
|
|
|
onPress: () => handleStar(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Pin
|
|
|
|
if (Message_AllowPinning && permissions?.hasPinPermission) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t(message.pinned ? 'Unpin' : 'Pin'),
|
|
|
|
icon: 'pin',
|
|
|
|
onPress: () => handlePin(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Read Receipts
|
|
|
|
if (Message_Read_Receipt_Store_Users) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Read_Receipt'),
|
2020-07-02 17:06:57 +00:00
|
|
|
icon: 'info',
|
2020-06-15 19:35:45 +00:00
|
|
|
onPress: () => handleReadReceipt(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Toggle Auto-translate
|
|
|
|
if (room.autoTranslate && message.u && message.u._id !== user.id) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t(message.autoTranslate ? 'View_Original' : 'Translate'),
|
|
|
|
icon: 'language',
|
|
|
|
onPress: () => handleToggleTranslation(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Report
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Report'),
|
|
|
|
icon: 'warning',
|
|
|
|
danger: true,
|
|
|
|
onPress: () => handleReport(message)
|
|
|
|
});
|
|
|
|
|
|
|
|
// Delete
|
|
|
|
if (allowDelete(message)) {
|
|
|
|
options.push({
|
|
|
|
title: I18n.t('Delete'),
|
2020-07-29 21:02:51 +00:00
|
|
|
icon: 'delete',
|
2020-06-15 19:35:45 +00:00
|
|
|
danger: true,
|
|
|
|
onPress: () => handleDelete(message)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
return options;
|
|
|
|
};
|
|
|
|
|
|
|
|
const showMessageActions = async(message) => {
|
2020-07-30 19:51:13 +00:00
|
|
|
logEvent(events.ROOM_SHOW_MSG_ACTIONS);
|
2020-06-15 19:35:45 +00:00
|
|
|
await getPermissions();
|
|
|
|
showActionSheet({
|
|
|
|
options: getOptions(message),
|
|
|
|
headerHeight: HEADER_HEIGHT,
|
|
|
|
customHeader: (!isReadOnly || room.reactWhenReadOnly ? (
|
|
|
|
<Header
|
|
|
|
server={server}
|
|
|
|
handleReaction={handleReaction}
|
2020-07-08 20:45:13 +00:00
|
|
|
isMasterDetail={isMasterDetail}
|
2020-06-15 19:35:45 +00:00
|
|
|
message={message}
|
|
|
|
/>
|
|
|
|
) : null)
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
useImperativeHandle(ref, () => ({ showMessageActions }));
|
|
|
|
}));
|
|
|
|
MessageActions.propTypes = {
|
|
|
|
room: PropTypes.object,
|
|
|
|
tmid: PropTypes.string,
|
|
|
|
user: PropTypes.object,
|
|
|
|
editInit: PropTypes.func,
|
|
|
|
reactionInit: PropTypes.func,
|
|
|
|
onReactionPress: PropTypes.func,
|
|
|
|
replyInit: PropTypes.func,
|
|
|
|
isReadOnly: PropTypes.bool,
|
|
|
|
Message_AllowDeleting: PropTypes.bool,
|
|
|
|
Message_AllowDeleting_BlockDeleteInMinutes: PropTypes.number,
|
|
|
|
Message_AllowEditing: PropTypes.bool,
|
|
|
|
Message_AllowEditing_BlockEditInMinutes: PropTypes.number,
|
|
|
|
Message_AllowPinning: PropTypes.bool,
|
|
|
|
Message_AllowStarring: PropTypes.bool,
|
|
|
|
Message_Read_Receipt_Store_Users: PropTypes.bool,
|
2021-02-25 16:41:44 +00:00
|
|
|
server: PropTypes.string,
|
|
|
|
editMessagePermission: PropTypes.array,
|
|
|
|
deleteMessagePermission: PropTypes.array,
|
|
|
|
forceDeleteMessagePermission: PropTypes.array,
|
|
|
|
pinMessagePermission: PropTypes.array
|
2020-06-15 19:35:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
|
|
|
server: state.server.server,
|
|
|
|
Message_AllowDeleting: state.settings.Message_AllowDeleting,
|
|
|
|
Message_AllowDeleting_BlockDeleteInMinutes: state.settings.Message_AllowDeleting_BlockDeleteInMinutes,
|
|
|
|
Message_AllowEditing: state.settings.Message_AllowEditing,
|
|
|
|
Message_AllowEditing_BlockEditInMinutes: state.settings.Message_AllowEditing_BlockEditInMinutes,
|
|
|
|
Message_AllowPinning: state.settings.Message_AllowPinning,
|
|
|
|
Message_AllowStarring: state.settings.Message_AllowStarring,
|
2020-07-08 20:45:13 +00:00
|
|
|
Message_Read_Receipt_Store_Users: state.settings.Message_Read_Receipt_Store_Users,
|
2021-02-25 16:41:44 +00:00
|
|
|
isMasterDetail: state.app.isMasterDetail,
|
|
|
|
editMessagePermission: state.permissions['edit-message'],
|
|
|
|
deleteMessagePermission: state.permissions['delete-message'],
|
|
|
|
forceDeleteMessagePermission: state.permissions['force-delete-message'],
|
|
|
|
pinMessagePermission: state.permissions['pin-message']
|
2020-06-15 19:35:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, null, null, { forwardRef: true })(MessageActions);
|