2018-04-24 19:34:03 +00:00
|
|
|
import React from 'react';
|
2021-11-10 17:56:19 +00:00
|
|
|
import { StackNavigationOptions, StackNavigationProp } from '@react-navigation/stack';
|
2021-12-03 19:27:57 +00:00
|
|
|
import { CompositeNavigationProp, RouteProp } from '@react-navigation/core';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { FlatList, Text, View } from 'react-native';
|
2020-09-11 14:31:38 +00:00
|
|
|
import { Q } from '@nozbe/watermelondb';
|
2018-04-24 19:34:03 +00:00
|
|
|
import { connect } from 'react-redux';
|
2021-02-26 16:01:45 +00:00
|
|
|
import { dequal } from 'dequal';
|
2018-04-24 19:34:03 +00:00
|
|
|
|
2022-06-27 18:46:59 +00:00
|
|
|
import { FormTextInput } from '../../containers/TextInput';
|
2019-12-04 16:39:53 +00:00
|
|
|
import ActivityIndicator from '../../containers/ActivityIndicator';
|
2019-08-27 12:25:38 +00:00
|
|
|
import Markdown from '../../containers/markdown';
|
2020-05-08 17:07:58 +00:00
|
|
|
import Message from '../../containers/message';
|
2022-06-06 14:17:51 +00:00
|
|
|
import scrollPersistTaps from '../../lib/methods/helpers/scrollPersistTaps';
|
2018-06-01 17:38:13 +00:00
|
|
|
import I18n from '../../i18n';
|
2019-03-12 16:23:06 +00:00
|
|
|
import StatusBar from '../../containers/StatusBar';
|
2022-06-06 14:17:51 +00:00
|
|
|
import log from '../../lib/methods/helpers/log';
|
2022-04-07 14:10:03 +00:00
|
|
|
import { themes } from '../../lib/constants';
|
2022-04-12 16:27:05 +00:00
|
|
|
import { TSupportedThemes, withTheme } from '../../theme';
|
2020-02-11 14:09:14 +00:00
|
|
|
import { getUserSelector } from '../../selectors/login';
|
2020-06-15 14:00:46 +00:00
|
|
|
import SafeAreaView from '../../containers/SafeAreaView';
|
2020-10-30 16:15:58 +00:00
|
|
|
import * as HeaderButton from '../../containers/HeaderButton';
|
2020-09-11 14:31:38 +00:00
|
|
|
import database from '../../lib/database';
|
2020-09-15 13:01:43 +00:00
|
|
|
import { sanitizeLikeString } from '../../lib/database/utils';
|
2021-05-26 17:24:54 +00:00
|
|
|
import getThreadName from '../../lib/methods/getThreadName';
|
2022-03-08 16:25:27 +00:00
|
|
|
import getRoomInfo, { IRoomInfoResult } from '../../lib/methods/getRoomInfo';
|
2021-09-13 20:41:05 +00:00
|
|
|
import styles from './styles';
|
2021-12-03 19:27:57 +00:00
|
|
|
import { InsideStackParamList, ChatsStackParamList } from '../../stacks/types';
|
2022-06-06 14:17:51 +00:00
|
|
|
import { compareServerVersion, debounce, isIOS } from '../../lib/methods/helpers';
|
|
|
|
import {
|
|
|
|
IMessageFromServer,
|
|
|
|
IUser,
|
|
|
|
TMessageModel,
|
|
|
|
IUrl,
|
|
|
|
IAttachment,
|
|
|
|
ISubscription,
|
|
|
|
SubscriptionType,
|
2022-10-21 18:27:55 +00:00
|
|
|
TSubscriptionModel,
|
|
|
|
TGetCustomEmoji,
|
|
|
|
ICustomEmoji
|
2022-06-06 14:17:51 +00:00
|
|
|
} from '../../definitions';
|
2022-04-28 20:37:25 +00:00
|
|
|
import { Services } from '../../lib/services';
|
2023-06-29 21:10:49 +00:00
|
|
|
import { TNavigation } from '../../stacks/stackType';
|
2018-04-24 19:34:03 +00:00
|
|
|
|
2021-10-05 13:58:21 +00:00
|
|
|
const QUERY_SIZE = 50;
|
2021-11-10 17:56:19 +00:00
|
|
|
|
|
|
|
interface ISearchMessagesViewState {
|
|
|
|
loading: boolean;
|
2022-05-23 17:46:30 +00:00
|
|
|
messages: (IMessageFromServer | TMessageModel)[];
|
2021-11-10 17:56:19 +00:00
|
|
|
searchText: string;
|
|
|
|
}
|
2021-12-03 19:27:57 +00:00
|
|
|
|
2022-04-01 21:52:38 +00:00
|
|
|
export interface IRoomInfoParam {
|
|
|
|
room?: ISubscription;
|
|
|
|
member?: any;
|
2021-12-03 19:27:57 +00:00
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
t: SubscriptionType;
|
2022-04-01 21:52:38 +00:00
|
|
|
joined?: boolean;
|
2021-12-03 19:27:57 +00:00
|
|
|
}
|
|
|
|
|
2021-11-10 17:56:19 +00:00
|
|
|
interface INavigationOption {
|
2021-12-03 19:27:57 +00:00
|
|
|
navigation: CompositeNavigationProp<
|
|
|
|
StackNavigationProp<ChatsStackParamList, 'SearchMessagesView'>,
|
2023-06-29 21:10:49 +00:00
|
|
|
StackNavigationProp<InsideStackParamList & TNavigation>
|
2021-12-03 19:27:57 +00:00
|
|
|
>;
|
|
|
|
route: RouteProp<ChatsStackParamList, 'SearchMessagesView'>;
|
2021-11-10 17:56:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
interface ISearchMessagesViewProps extends INavigationOption {
|
2022-05-23 17:46:30 +00:00
|
|
|
user: IUser;
|
2021-11-10 17:56:19 +00:00
|
|
|
baseUrl: string;
|
|
|
|
serverVersion: string;
|
|
|
|
customEmojis: {
|
2022-10-21 18:27:55 +00:00
|
|
|
[key: string]: ICustomEmoji;
|
2021-11-10 17:56:19 +00:00
|
|
|
};
|
2023-05-18 21:09:33 +00:00
|
|
|
theme?: TSupportedThemes;
|
2021-11-10 17:56:19 +00:00
|
|
|
useRealName: boolean;
|
|
|
|
}
|
|
|
|
class SearchMessagesView extends React.Component<ISearchMessagesViewProps, ISearchMessagesViewState> {
|
|
|
|
private offset: number;
|
|
|
|
|
|
|
|
private rid: string;
|
|
|
|
|
2022-05-23 17:46:30 +00:00
|
|
|
private t: SubscriptionType;
|
2021-11-10 17:56:19 +00:00
|
|
|
|
|
|
|
private encrypted: boolean | undefined;
|
|
|
|
|
2022-03-08 16:25:27 +00:00
|
|
|
private room?: IRoomInfoResult;
|
2021-11-10 17:56:19 +00:00
|
|
|
|
|
|
|
static navigationOptions = ({ navigation, route }: INavigationOption) => {
|
|
|
|
const options: StackNavigationOptions = {
|
2020-06-15 14:00:46 +00:00
|
|
|
title: I18n.t('Search')
|
|
|
|
};
|
|
|
|
const showCloseModal = route.params?.showCloseModal;
|
|
|
|
if (showCloseModal) {
|
2020-10-30 16:15:58 +00:00
|
|
|
options.headerLeft = () => <HeaderButton.CloseModal navigation={navigation} />;
|
2020-06-15 14:00:46 +00:00
|
|
|
}
|
|
|
|
return options;
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2018-10-23 21:39:48 +00:00
|
|
|
|
2021-11-10 17:56:19 +00:00
|
|
|
constructor(props: ISearchMessagesViewProps) {
|
2019-05-28 13:03:08 +00:00
|
|
|
super(props);
|
2018-04-24 19:34:03 +00:00
|
|
|
this.state = {
|
2018-12-12 15:15:10 +00:00
|
|
|
loading: false,
|
2018-04-24 19:34:03 +00:00
|
|
|
messages: [],
|
2018-12-12 15:15:10 +00:00
|
|
|
searchText: ''
|
2018-04-24 19:34:03 +00:00
|
|
|
};
|
2021-10-05 13:58:21 +00:00
|
|
|
this.offset = 0;
|
2021-11-10 17:56:19 +00:00
|
|
|
this.rid = props.route.params.rid;
|
2021-05-26 17:24:54 +00:00
|
|
|
this.t = props.route.params?.t;
|
2020-09-11 14:31:38 +00:00
|
|
|
this.encrypted = props.route.params?.encrypted;
|
2018-04-24 19:34:03 +00:00
|
|
|
}
|
|
|
|
|
2021-05-26 17:24:54 +00:00
|
|
|
async componentDidMount() {
|
2022-03-08 16:25:27 +00:00
|
|
|
this.room = (await getRoomInfo(this.rid)) ?? undefined;
|
2021-05-26 17:24:54 +00:00
|
|
|
}
|
|
|
|
|
2021-11-10 17:56:19 +00:00
|
|
|
shouldComponentUpdate(nextProps: ISearchMessagesViewProps, nextState: ISearchMessagesViewState) {
|
2018-12-21 10:55:35 +00:00
|
|
|
const { loading, searchText, messages } = this.state;
|
2019-12-04 16:39:53 +00:00
|
|
|
const { theme } = this.props;
|
|
|
|
if (nextProps.theme !== theme) {
|
|
|
|
return true;
|
|
|
|
}
|
2018-12-21 10:55:35 +00:00
|
|
|
if (nextState.loading !== loading) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (nextState.searchText !== searchText) {
|
|
|
|
return true;
|
|
|
|
}
|
2021-02-26 16:01:45 +00:00
|
|
|
if (!dequal(nextState.messages, messages)) {
|
2018-12-21 10:55:35 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-04-24 19:34:03 +00:00
|
|
|
componentWillUnmount() {
|
2021-11-10 17:56:19 +00:00
|
|
|
this.searchDebounced?.stop?.();
|
2020-09-11 14:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Handle encrypted rooms search messages
|
2022-05-23 17:46:30 +00:00
|
|
|
searchMessages = async (searchText: string): Promise<(IMessageFromServer | TMessageModel)[]> => {
|
2021-10-05 13:58:21 +00:00
|
|
|
if (!searchText) {
|
|
|
|
return [];
|
|
|
|
}
|
2020-09-11 14:31:38 +00:00
|
|
|
// If it's a encrypted, room we'll search only on the local stored messages
|
|
|
|
if (this.encrypted) {
|
|
|
|
const db = database.active;
|
2021-02-26 16:25:51 +00:00
|
|
|
const messagesCollection = db.get('messages');
|
2020-09-15 13:01:43 +00:00
|
|
|
const likeString = sanitizeLikeString(searchText);
|
2020-09-11 14:31:38 +00:00
|
|
|
return messagesCollection
|
|
|
|
.query(
|
|
|
|
// Messages of this room
|
|
|
|
Q.where('rid', this.rid),
|
|
|
|
// Message content is like the search text
|
2021-09-13 20:41:05 +00:00
|
|
|
Q.where('msg', Q.like(`%${likeString}%`))
|
2020-09-11 14:31:38 +00:00
|
|
|
)
|
|
|
|
.fetch();
|
|
|
|
}
|
|
|
|
// If it's not a encrypted room, search messages on the server
|
2022-04-28 20:37:25 +00:00
|
|
|
const result = await Services.searchMessages(this.rid, searchText, QUERY_SIZE, this.offset);
|
2020-09-11 14:31:38 +00:00
|
|
|
if (result.success) {
|
2022-05-03 19:52:56 +00:00
|
|
|
const urlRenderMessages = result.messages?.map(message => {
|
|
|
|
if (message.urls && message.urls.length > 0) {
|
|
|
|
message.urls = message.urls?.map((url, index) => {
|
|
|
|
if (url.meta) {
|
|
|
|
return {
|
|
|
|
_id: index,
|
|
|
|
title: url.meta.pageTitle,
|
|
|
|
description: url.meta.ogDescription,
|
|
|
|
image: url.meta.ogImage,
|
|
|
|
url: url.url
|
|
|
|
} as IUrl;
|
|
|
|
}
|
|
|
|
return {} as IUrl;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return message;
|
|
|
|
});
|
2022-05-31 17:37:42 +00:00
|
|
|
this.offset += QUERY_SIZE;
|
2022-05-03 19:52:56 +00:00
|
|
|
return urlRenderMessages;
|
2020-09-11 14:31:38 +00:00
|
|
|
}
|
2022-03-10 15:17:49 +00:00
|
|
|
return [];
|
|
|
|
};
|
2021-11-10 17:56:19 +00:00
|
|
|
getMessages = async (searchText: string, debounced?: boolean) => {
|
2018-04-24 19:34:03 +00:00
|
|
|
try {
|
2020-09-11 14:31:38 +00:00
|
|
|
const messages = await this.searchMessages(searchText);
|
2021-10-05 13:58:21 +00:00
|
|
|
this.setState(prevState => ({
|
|
|
|
messages: debounced ? messages : [...prevState.messages, ...messages],
|
2020-09-11 14:31:38 +00:00
|
|
|
loading: false
|
2021-10-05 13:58:21 +00:00
|
|
|
}));
|
2019-08-23 13:18:47 +00:00
|
|
|
} catch (e) {
|
2018-12-12 15:15:10 +00:00
|
|
|
this.setState({ loading: false });
|
2019-08-23 13:18:47 +00:00
|
|
|
log(e);
|
2018-04-24 19:34:03 +00:00
|
|
|
}
|
2021-10-05 13:58:21 +00:00
|
|
|
};
|
|
|
|
|
2021-11-10 17:56:19 +00:00
|
|
|
search = (searchText: string) => {
|
2021-10-05 13:58:21 +00:00
|
|
|
this.offset = 0;
|
|
|
|
this.setState({ searchText, loading: true, messages: [] });
|
|
|
|
this.searchDebounced(searchText);
|
|
|
|
};
|
|
|
|
|
2021-11-10 17:56:19 +00:00
|
|
|
searchDebounced = debounce(async (searchText: string) => {
|
2021-10-05 13:58:21 +00:00
|
|
|
await this.getMessages(searchText, true);
|
2021-09-13 20:41:05 +00:00
|
|
|
}, 1000);
|
2018-04-24 19:34:03 +00:00
|
|
|
|
2022-10-21 18:27:55 +00:00
|
|
|
getCustomEmoji: TGetCustomEmoji = name => {
|
2019-09-16 20:26:32 +00:00
|
|
|
const { customEmojis } = this.props;
|
|
|
|
const emoji = customEmojis[name];
|
|
|
|
if (emoji) {
|
|
|
|
return emoji;
|
|
|
|
}
|
|
|
|
return null;
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2019-09-16 20:26:32 +00:00
|
|
|
|
2021-12-03 19:27:57 +00:00
|
|
|
showAttachment = (attachment: IAttachment) => {
|
2021-05-26 17:24:54 +00:00
|
|
|
const { navigation } = this.props;
|
|
|
|
navigation.navigate('AttachmentView', { attachment });
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2021-05-26 17:24:54 +00:00
|
|
|
|
2021-12-03 19:27:57 +00:00
|
|
|
navToRoomInfo = (navParam: IRoomInfoParam) => {
|
2020-02-17 16:06:46 +00:00
|
|
|
const { navigation, user } = this.props;
|
|
|
|
if (navParam.rid === user.id) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
navigation.navigate('RoomInfoView', navParam);
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2020-02-17 16:06:46 +00:00
|
|
|
|
2022-05-23 17:46:30 +00:00
|
|
|
jumpToMessage = async ({ item }: { item: IMessageFromServer | TMessageModel }) => {
|
2021-05-26 17:24:54 +00:00
|
|
|
const { navigation } = this.props;
|
2022-05-23 17:46:30 +00:00
|
|
|
let params: {
|
|
|
|
rid: string;
|
|
|
|
jumpToMessageId: string;
|
|
|
|
t: SubscriptionType;
|
|
|
|
room: TSubscriptionModel | undefined;
|
|
|
|
tmid?: string;
|
|
|
|
name?: string;
|
|
|
|
} = {
|
2021-05-26 17:24:54 +00:00
|
|
|
rid: this.rid,
|
|
|
|
jumpToMessageId: item._id,
|
|
|
|
t: this.t,
|
2022-05-23 17:46:30 +00:00
|
|
|
room: this.room as TSubscriptionModel
|
2021-05-26 17:24:54 +00:00
|
|
|
};
|
2022-05-23 17:46:30 +00:00
|
|
|
if ('tmid' in item && item.tmid) {
|
2021-05-26 17:24:54 +00:00
|
|
|
navigation.pop();
|
|
|
|
params = {
|
|
|
|
...params,
|
|
|
|
tmid: item.tmid,
|
2022-05-23 17:46:30 +00:00
|
|
|
name: await getThreadName(this.rid, item.tmid as string, item._id),
|
|
|
|
t: SubscriptionType.THREAD
|
2021-05-26 17:24:54 +00:00
|
|
|
};
|
|
|
|
navigation.push('RoomView', params);
|
|
|
|
} else {
|
|
|
|
navigation.navigate('RoomView', params);
|
|
|
|
}
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2021-05-26 17:24:54 +00:00
|
|
|
|
2021-10-05 13:58:21 +00:00
|
|
|
onEndReached = async () => {
|
|
|
|
const { serverVersion } = this.props;
|
|
|
|
const { searchText, messages, loading } = this.state;
|
|
|
|
if (
|
|
|
|
messages.length < this.offset ||
|
|
|
|
this.encrypted ||
|
|
|
|
loading ||
|
2022-02-07 18:44:04 +00:00
|
|
|
compareServerVersion(serverVersion, 'lowerThan', '3.17.0')
|
2021-10-05 13:58:21 +00:00
|
|
|
) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.setState({ loading: true });
|
|
|
|
await this.getMessages(searchText);
|
|
|
|
};
|
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
renderEmpty = () => {
|
|
|
|
const { theme } = this.props;
|
|
|
|
return (
|
2023-05-18 21:09:33 +00:00
|
|
|
<View style={[styles.listEmptyContainer, { backgroundColor: themes[theme!].backgroundColor }]}>
|
|
|
|
<Text style={[styles.noDataFound, { color: themes[theme!].titleText }]}>{I18n.t('No_results_found')}</Text>
|
2019-12-04 16:39:53 +00:00
|
|
|
</View>
|
|
|
|
);
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2018-04-24 19:34:03 +00:00
|
|
|
|
2022-05-23 17:46:30 +00:00
|
|
|
renderItem = ({ item }: { item: IMessageFromServer | TMessageModel }) => {
|
|
|
|
const message = item as TMessageModel;
|
2021-09-13 20:41:05 +00:00
|
|
|
const { user, baseUrl, theme, useRealName } = this.props;
|
2018-09-25 19:28:42 +00:00
|
|
|
return (
|
|
|
|
<Message
|
2022-05-23 17:46:30 +00:00
|
|
|
item={message}
|
2018-12-12 15:15:10 +00:00
|
|
|
baseUrl={baseUrl}
|
2018-09-25 19:28:42 +00:00
|
|
|
user={user}
|
2021-05-26 17:24:54 +00:00
|
|
|
timeFormat='MMM Do YYYY, h:mm:ss a'
|
|
|
|
isThreadRoom
|
|
|
|
showAttachment={this.showAttachment}
|
2019-09-16 20:26:32 +00:00
|
|
|
getCustomEmoji={this.getCustomEmoji}
|
2020-02-17 16:06:46 +00:00
|
|
|
navToRoomInfo={this.navToRoomInfo}
|
2021-02-11 21:43:57 +00:00
|
|
|
useRealName={useRealName}
|
2023-05-18 21:09:33 +00:00
|
|
|
theme={theme!}
|
2021-05-26 17:24:54 +00:00
|
|
|
onPress={() => this.jumpToMessage({ item })}
|
|
|
|
jumpToMessage={() => this.jumpToMessage({ item })}
|
2022-05-23 17:46:30 +00:00
|
|
|
rid={message.rid}
|
2018-12-12 15:15:10 +00:00
|
|
|
/>
|
|
|
|
);
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2018-12-12 15:15:10 +00:00
|
|
|
|
|
|
|
renderList = () => {
|
|
|
|
const { messages, loading, searchText } = this.state;
|
2019-12-04 16:39:53 +00:00
|
|
|
const { theme } = this.props;
|
2018-12-12 15:15:10 +00:00
|
|
|
|
|
|
|
if (!loading && messages.length === 0 && searchText.length) {
|
|
|
|
return this.renderEmpty();
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<FlatList
|
|
|
|
data={messages}
|
|
|
|
renderItem={this.renderItem}
|
2023-05-18 21:09:33 +00:00
|
|
|
style={[styles.list, { backgroundColor: themes[theme!].backgroundColor }]}
|
2018-12-12 15:15:10 +00:00
|
|
|
keyExtractor={item => item._id}
|
2021-10-05 13:58:21 +00:00
|
|
|
onEndReached={this.onEndReached}
|
2022-03-18 02:37:10 +00:00
|
|
|
ListFooterComponent={loading ? <ActivityIndicator /> : null}
|
2021-10-05 13:58:21 +00:00
|
|
|
onEndReachedThreshold={0.5}
|
|
|
|
removeClippedSubviews={isIOS}
|
2018-12-12 15:15:10 +00:00
|
|
|
{...scrollPersistTaps}
|
2018-09-25 19:28:42 +00:00
|
|
|
/>
|
|
|
|
);
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2018-04-24 19:34:03 +00:00
|
|
|
|
|
|
|
render() {
|
2019-12-04 16:39:53 +00:00
|
|
|
const { theme } = this.props;
|
2018-04-24 19:34:03 +00:00
|
|
|
return (
|
2023-05-18 21:09:33 +00:00
|
|
|
<SafeAreaView style={{ backgroundColor: themes[theme!].backgroundColor }} testID='search-messages-view'>
|
2020-10-30 13:59:44 +00:00
|
|
|
<StatusBar />
|
2023-04-18 12:46:53 +00:00
|
|
|
<View style={styles.searchContainer}>
|
|
|
|
<FormTextInput
|
|
|
|
autoFocus
|
|
|
|
label={I18n.t('Search')}
|
|
|
|
onChangeText={this.search}
|
|
|
|
placeholder={I18n.t('Search_Messages')}
|
|
|
|
testID='search-message-view-input'
|
|
|
|
/>
|
2023-05-18 21:09:33 +00:00
|
|
|
<Markdown msg={I18n.t('You_can_search_using_RegExp_eg')} theme={theme!} />
|
|
|
|
<View style={[styles.divider, { backgroundColor: themes[theme!].separatorColor }]} />
|
2023-04-18 12:46:53 +00:00
|
|
|
</View>
|
|
|
|
{this.renderList()}
|
2018-08-01 19:35:06 +00:00
|
|
|
</SafeAreaView>
|
2018-04-24 19:34:03 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2019-08-07 13:51:34 +00:00
|
|
|
|
2021-11-10 17:56:19 +00:00
|
|
|
const mapStateToProps = (state: any) => ({
|
2021-10-05 13:58:21 +00:00
|
|
|
serverVersion: state.server.version,
|
2020-02-11 14:09:14 +00:00
|
|
|
baseUrl: state.server.server,
|
|
|
|
user: getUserSelector(state),
|
2021-02-11 21:43:57 +00:00
|
|
|
useRealName: state.settings.UI_Use_Real_Name,
|
2019-09-16 20:26:32 +00:00
|
|
|
customEmojis: state.customEmojis
|
2019-08-07 13:51:34 +00:00
|
|
|
});
|
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
export default connect(mapStateToProps)(withTheme(SearchMessagesView));
|