fix missing topic name in contacts

This commit is contained in:
or-else
2021-03-15 16:47:03 -07:00
parent beb861d707
commit 6cd180771a
+4
View File
@@ -675,6 +675,10 @@ class TinodeWeb extends React.Component {
} }
this.tinode.getMeTopic().contacts((c) => { this.tinode.getMeTopic().contacts((c) => {
if (!c.topic && !c.user) {
// Contacts expect c.topic to be set.
c.topic = c.name;
}
newState.chatList.push(c); newState.chatList.push(c);
if (this.state.topicSelected == c.topic) { if (this.state.topicSelected == c.topic) {
newState.topicSelectedOnline = c.online; newState.topicSelectedOnline = c.online;