report & mark message

This commit is contained in:
negue
2018-06-08 20:26:26 +02:00
parent e3b2443029
commit dc5722d0de
6 changed files with 86 additions and 26 deletions

View File

@@ -113,12 +113,22 @@ export default {
async reportAbuse () {
this.text('Thank you for reporting this violation. The moderators have been notified.');
await this.$store.dispatch('chat:flag', {
let result = await this.$store.dispatch('chat:flag', {
groupId: this.groupId,
chatId: this.abuseObject.id,
comment: this.reportComment,
});
console.info('error', result);
this.$root.$emit('habitica:report-result', result);
if (!result.ok && result.error) {
alert('errrorororor!');
console.info('error', result);
this.error(result.error);
}
this.close();
},
async clearFlagCount () {