移除可以与同一用户创建多个会话的特性

This commit is contained in:
masnn committed 2020-05-15 13:10:41 +08:00
1 parent d04628148f
commit 3c5fdb9032
16 files changed
+120 -118

No files matched your search

@@ -18,9 +18,7 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = (dispatch) => ({
handleChange(id, value) {
if (id === null) {
return;
}
if (id === null) return;
dispatch({
type: 'DIALOGUES_INPUT_CHANGED',
payload: value,
@@ -30,11 +28,9 @@ const mapDispatchToProps = (dispatch) => ({
});
},
postSend(placeholderId, uid, value) {
if (placeholderId === null) {
return;
}
if (placeholderId === null) return;
const req = request.post('', {
operation: 'send_message',
operation: 'send',
uid,
content: value,
});
@@ -46,20 +42,19 @@ const mapDispatchToProps = (dispatch) => ({
},
});
},
postReply(id, value) {
if (id === null) {
return;
}
postReply(_id, uid, value) {
if (_id === null) return;
const req = request.post('', {
operation: 'reply_message',
message_id: id,
operation: 'send',
type: 'single',
uid,
content: value,
});
dispatch({
type: 'DIALOGUES_POST_REPLY',
payload: req,
meta: {
dialogueId: id,
dialogueId: _id,
},
});
},
@@ -103,6 +98,7 @@ export default class MessagePadInputContainer extends React.PureComponent {
} else {
this.props.postReply(
this.props.activeId,
state.dialogues[this.props.activeId].to,
this.props.inputValue,
);
}