Browse Source

fix: set default value for the message owner (#597)

HEAD
Kelvin Chiu GitHub 2 years ago
parent
commit
b185161aa9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions
  1. +1
    -1
      web/src/ChatPage.js
  2. +7
    -6
      web/src/MessageListPage.js

+ 1
- 1
web/src/ChatPage.js View File

@@ -59,7 +59,7 @@ class ChatPage extends BaseListPage {
newMessage(text) {
const randomName = Setting.getRandomName();
return {
owner: this.props.account.owner, // this.props.account.messagename,
owner: "admin", // this.props.account.messagename,
name: `message_${randomName}`,
createdTime: moment().format(),
// organization: this.props.account.owner,


+ 7
- 6
web/src/MessageListPage.js View File

@@ -115,7 +115,7 @@ class MessageListPage extends React.Component {
title: i18next.t("general:Created time"),
dataIndex: "createdTime",
key: "createdTime",
width: "130px",
width: "120px",
sorter: (a, b) => a.createdTime.localeCompare(b.createdTime),
render: (text, record, index) => {
return Setting.getFormattedDate(text);
@@ -129,7 +129,7 @@ class MessageListPage extends React.Component {
sorter: (a, b) => a.chat.localeCompare(b.chat),
render: (text, record, index) => {
return (
<Link to={`/chat/${text}`}>
<Link to={`/chats/${text}`}>
{text}
</Link>
);
@@ -139,12 +139,13 @@ class MessageListPage extends React.Component {
title: i18next.t("message:Reply to"),
dataIndex: "replyTo",
key: "replyTo",
width: "130px",
width: "100px",
sorter: (a, b) => a.replyTo.localeCompare(b.replyTo),
render: (text, record, index) => {
const textTemp = text.split("/")[1];
return (
<Link to={`/message/${text}`}>
{text}
<Link to={`/messages/${textTemp}`}>
{textTemp}
</Link>
);
},
@@ -153,7 +154,7 @@ class MessageListPage extends React.Component {
title: i18next.t("message:Author"),
dataIndex: "author",
key: "author",
width: "120px",
width: "100px",
sorter: (a, b) => a.author.localeCompare(b.author),
render: (text, record, index) => {
return (


Loading…
Cancel
Save