fix broken spam reporting

This commit is contained in:
or-else
2022-03-19 09:18:01 -07:00
parent 74b756d817
commit 601c048ea5
8 changed files with 29 additions and 19 deletions
+2 -5
View File
@@ -1411,7 +1411,7 @@ class TinodeWeb extends React.Component {
return;
}
topic.updateMode(null, '-JP').then((ctrl) => {
topic.updateMode(null, '-JP').then(_ => {
// Hide MessagesView and InfoView panels.
HashNavigation.navigateTo(HashNavigation.setUrlTopic(window.location.hash, ''));
}).catch((err) => {
@@ -1426,10 +1426,7 @@ class TinodeWeb extends React.Component {
}
// Publish spam report.
this.tinode.publish(Tinode.TOPIC_SYS, Tinode.Drafty.attachJSON(null, {
'action': 'report',
'target': topicName
}));
this.tinode.report('report', topicName);
// Remove J and P permissions.
topic.updateMode(null, '-JP').then((ctrl) => {