Commit d162e063 by Sixong.Zhu

u

parent 466962ea
Showing with 9 additions and 5 deletions
...@@ -346,8 +346,8 @@ ...@@ -346,8 +346,8 @@
return true; return true;
} }
// 系统推送的消息,默认为客服发送 // 系统推送的消息或老用户(一般是客服,eid为负数),默认为客服发送
if (this.messageBody && +this.messageBody.eid === 0) { if (this.messageBody && +this.messageBody.eid <= 0) {
return true; return true;
} }
...@@ -377,15 +377,19 @@ ...@@ -377,15 +377,19 @@
} }
private get userName() { private get userName() {
if (this.refetchUsername) {
return this.refetchUsername;
}
if (this.chatMembers) { if (this.chatMembers) {
const t = this.chatMembers.find((i) => i.eid === this.data.eid); const t = this.chatMembers.find((i) => i.eid === this.data.eid);
if (t) { if (t) {
return this.getFilterUsername(t.alias_name || t.name); const name = this.getFilterUsername(t.alias_name || t.name);
if (name) {
return name;
} }
} }
if (!this.refetchUsername) {
this.refetchUsername4Message();
} }
this.refetchUsername4Message();
return this.refetchUsername; return this.refetchUsername;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment