Feature: Slack - receive messages, create threads, send replies (#974)

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Sojan Jose
2020-06-22 13:19:26 +05:30
committed by GitHub
parent aa8a85b8bd
commit 1ef8d03e18
53 changed files with 815 additions and 188 deletions

View File

@@ -1,6 +1,5 @@
/* eslint no-param-reassign: 0 */
import axios from 'axios';
import moment from 'moment';
import Vue from 'vue';
import * as types from '../mutation-types';
import authAPI from '../../api/auth';
@@ -50,21 +49,6 @@ export const getters = {
getCurrentUser(_state) {
return _state.currentUser;
},
getSubscription(_state) {
return _state.currentUser.subscription === undefined
? null
: _state.currentUser.subscription;
},
getTrialLeft(_state) {
const createdAt =
_state.currentUser.subscription === undefined
? moment()
: _state.currentUser.subscription.expiry * 1000;
const daysLeft = moment(createdAt).diff(moment(), 'days');
return daysLeft < 0 ? 0 : daysLeft;
},
};
// actions