fix flagging in the new inbox collection - move flag private message to api/v4

This commit is contained in:
negue
2018-10-02 21:23:29 +02:00
parent 60a6f6f2f6
commit 7e80406181
4 changed files with 56 additions and 7 deletions

View File

@@ -27,7 +27,6 @@ div
span.action(v-if='(inbox || (user.flags.communityGuidelinesAccepted && msg.uuid !== "system")) && !isMessageReported', @click='report(msg)')
.svg-icon(v-html="icons.report", v-once)
span(v-once) {{$t('report')}}
// @TODO make flagging/reporting work in the inbox. NOTE: it must work even if the communityGuidelines are not accepted and it MUST work for messages that you have SENT as well as received. -- Alys
span.action(v-if='msg.uuid === user._id || inbox || user.contributor.admin', @click='remove()')
.svg-icon(v-html="icons.delete", v-once)
span(v-once) {{$t('delete')}}
@@ -238,7 +237,7 @@ export default {
return achievementsLib.getContribText(message.contributor, message.backer) || '';
},
isMessageReported () {
return this.msg.reported || this.reported;
return this.msg.flags && this.msg.flags[this.user.id] || this.reported;
},
},
methods: {