mirror of
https://github.com/discourse/discourse.git
synced 2025-02-04 05:49:30 +08:00
22 lines
681 B
JavaScript
22 lines
681 B
JavaScript
import RestModel from 'discourse/models/rest';
|
|
import UserAction from 'discourse/models/user-action';
|
|
import { i18n } from 'discourse/lib/computed';
|
|
|
|
export default RestModel.extend({
|
|
|
|
isPM: function() {
|
|
const actionType = this.get('action_type');
|
|
return actionType === UserAction.TYPES.messages_sent ||
|
|
actionType === UserAction.TYPES.messages_received;
|
|
}.property('action_type'),
|
|
|
|
description: i18n('action_type', 'user_action_groups.%@'),
|
|
|
|
isResponse: function() {
|
|
const actionType = this.get('action_type');
|
|
return actionType === UserAction.TYPES.replies ||
|
|
actionType === UserAction.TYPES.quotes;
|
|
}.property('action_type')
|
|
|
|
});
|