feat: Add a view for mentions (#3505)
- Added a new table mentions for saving user mentions - Added a filter conversation_type in the API - Added a view to see the mentions
This commit is contained in:
parent
1db82f235d
commit
2be71e73dc
28 changed files with 389 additions and 98 deletions
|
@ -70,7 +70,12 @@ class ConversationFinder
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_all_conversations
|
def find_all_conversations
|
||||||
@conversations = current_account.conversations.where(inbox_id: @inbox_ids)
|
if params[:conversation_type] == 'mention'
|
||||||
|
conversation_ids = current_account.mentions.where(user: current_user).pluck(:conversation_id)
|
||||||
|
@conversations = current_account.conversations.where(id: conversation_ids)
|
||||||
|
else
|
||||||
|
@conversations = current_account.conversations.where(inbox_id: @inbox_ids)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def filter_by_assignee_type
|
def filter_by_assignee_type
|
||||||
|
@ -123,6 +128,10 @@ class ConversationFinder
|
||||||
@conversations = @conversations.includes(
|
@conversations = @conversations.includes(
|
||||||
:taggings, :inbox, { assignee: { avatar_attachment: [:blob] } }, { contact: { avatar_attachment: [:blob] } }, :team, :contact_inbox
|
:taggings, :inbox, { assignee: { avatar_attachment: [:blob] } }, { contact: { avatar_attachment: [:blob] } }, :team, :contact_inbox
|
||||||
)
|
)
|
||||||
@conversations.latest.page(current_page)
|
if params[:conversation_type] == 'mention'
|
||||||
|
@conversations.page(current_page)
|
||||||
|
else
|
||||||
|
@conversations.latest.page(current_page)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,15 @@ class ConversationApi extends ApiClient {
|
||||||
super('conversations', { accountScoped: true });
|
super('conversations', { accountScoped: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
get({ inboxId, status, assigneeType, page, labels, teamId }) {
|
get({
|
||||||
|
inboxId,
|
||||||
|
status,
|
||||||
|
assigneeType,
|
||||||
|
page,
|
||||||
|
labels,
|
||||||
|
teamId,
|
||||||
|
conversationType,
|
||||||
|
}) {
|
||||||
return axios.get(this.url, {
|
return axios.get(this.url, {
|
||||||
params: {
|
params: {
|
||||||
inbox_id: inboxId,
|
inbox_id: inboxId,
|
||||||
|
@ -15,6 +23,7 @@ class ConversationApi extends ApiClient {
|
||||||
assignee_type: assigneeType,
|
assignee_type: assigneeType,
|
||||||
page,
|
page,
|
||||||
labels,
|
labels,
|
||||||
|
conversation_type: conversationType,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -74,7 +83,7 @@ class ConversationApi extends ApiClient {
|
||||||
return axios.post(`${this.url}/${conversationId}/unmute`);
|
return axios.post(`${this.url}/${conversationId}/unmute`);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta({ inboxId, status, assigneeType, labels, teamId }) {
|
meta({ inboxId, status, assigneeType, labels, teamId, conversationType }) {
|
||||||
return axios.get(`${this.url}/meta`, {
|
return axios.get(`${this.url}/meta`, {
|
||||||
params: {
|
params: {
|
||||||
inbox_id: inboxId,
|
inbox_id: inboxId,
|
||||||
|
@ -82,6 +91,7 @@ class ConversationApi extends ApiClient {
|
||||||
assignee_type: assigneeType,
|
assignee_type: assigneeType,
|
||||||
labels,
|
labels,
|
||||||
team_id: teamId,
|
team_id: teamId,
|
||||||
|
conversation_type: conversationType,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ l<template>
|
||||||
:active-label="label"
|
:active-label="label"
|
||||||
:team-id="teamId"
|
:team-id="teamId"
|
||||||
:chat="chat"
|
:chat="chat"
|
||||||
|
:conversation-type="conversationType"
|
||||||
:show-assignee="showAssigneeInConversationCard"
|
:show-assignee="showAssigneeInConversationCard"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -133,6 +134,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
conversationType: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -203,6 +208,9 @@ export default {
|
||||||
page: this.currentPage + 1,
|
page: this.currentPage + 1,
|
||||||
labels: this.label ? [this.label] : undefined,
|
labels: this.label ? [this.label] : undefined,
|
||||||
teamId: this.teamId ? this.teamId : undefined,
|
teamId: this.teamId ? this.teamId : undefined,
|
||||||
|
conversationType: this.conversationType
|
||||||
|
? this.conversationType
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
pageTitle() {
|
pageTitle() {
|
||||||
|
@ -215,6 +223,9 @@ export default {
|
||||||
if (this.label) {
|
if (this.label) {
|
||||||
return `#${this.label}`;
|
return `#${this.label}`;
|
||||||
}
|
}
|
||||||
|
if (this.conversationType === 'mention') {
|
||||||
|
return this.$t('CHAT_LIST.MENTION_HEADING');
|
||||||
|
}
|
||||||
return this.$t('CHAT_LIST.TAB_HEADING');
|
return this.$t('CHAT_LIST.TAB_HEADING');
|
||||||
},
|
},
|
||||||
conversationList() {
|
conversationList() {
|
||||||
|
@ -251,6 +262,9 @@ export default {
|
||||||
label() {
|
label() {
|
||||||
this.resetAndFetchData();
|
this.resetAndFetchData();
|
||||||
},
|
},
|
||||||
|
conversationType() {
|
||||||
|
this.resetAndFetchData();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$store.dispatch('setChatFilter', this.activeStatus);
|
this.$store.dispatch('setChatFilter', this.activeStatus);
|
||||||
|
|
|
@ -12,6 +12,8 @@ const conversations = accountId => ({
|
||||||
'conversations_through_label',
|
'conversations_through_label',
|
||||||
'team_conversations',
|
'team_conversations',
|
||||||
'conversations_through_team',
|
'conversations_through_team',
|
||||||
|
'conversation_mentions',
|
||||||
|
'conversation_through_mentions',
|
||||||
],
|
],
|
||||||
menuItems: [
|
menuItems: [
|
||||||
{
|
{
|
||||||
|
@ -22,6 +24,13 @@ const conversations = accountId => ({
|
||||||
toolTip: 'Conversation from all subscribed inboxes',
|
toolTip: 'Conversation from all subscribed inboxes',
|
||||||
toStateName: 'home',
|
toStateName: 'home',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'mention',
|
||||||
|
label: 'MENTIONED_CONVERSATIONS',
|
||||||
|
key: 'conversation_mentions',
|
||||||
|
toState: frontendURL(`accounts/${accountId}/mentions/conversations`),
|
||||||
|
toStateName: 'conversation_mentions',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { mount } from '@vue/test-utils';
|
import { shallowMount } from '@vue/test-utils';
|
||||||
import SidemenuIcon from '../SidemenuIcon';
|
import SidemenuIcon from '../SidemenuIcon';
|
||||||
|
|
||||||
describe('SidemenuIcon', () => {
|
describe('SidemenuIcon', () => {
|
||||||
test('matches snapshot', () => {
|
test('matches snapshot', () => {
|
||||||
const wrapper = mount(SidemenuIcon);
|
const wrapper = shallowMount(SidemenuIcon);
|
||||||
expect(wrapper.vm).toBeTruthy();
|
expect(wrapper.vm).toBeTruthy();
|
||||||
expect(wrapper.element).toMatchSnapshot();
|
expect(wrapper.element).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
|
@ -133,6 +133,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
conversationType: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -243,6 +247,7 @@ export default {
|
||||||
id: chat.id,
|
id: chat.id,
|
||||||
label: this.activeLabel,
|
label: this.activeLabel,
|
||||||
teamId: this.teamId,
|
teamId: this.teamId,
|
||||||
|
conversationType: this.conversationType,
|
||||||
});
|
});
|
||||||
router.push({ path: frontendURL(path) });
|
router.push({ path: frontendURL(path) });
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@ import VTooltip from 'v-tooltip';
|
||||||
|
|
||||||
import Button from 'dashboard/components/buttons/Button';
|
import Button from 'dashboard/components/buttons/Button';
|
||||||
import i18n from 'dashboard/i18n';
|
import i18n from 'dashboard/i18n';
|
||||||
|
import FluentIcon from 'shared/components/FluentIcon/DashboardIcon';
|
||||||
import MoreActions from '../MoreActions';
|
import MoreActions from '../MoreActions';
|
||||||
|
|
||||||
const localVue = createLocalVue();
|
const localVue = createLocalVue();
|
||||||
|
@ -13,6 +13,7 @@ localVue.use(Vuex);
|
||||||
localVue.use(VueI18n);
|
localVue.use(VueI18n);
|
||||||
localVue.use(VTooltip);
|
localVue.use(VTooltip);
|
||||||
|
|
||||||
|
localVue.component('fluent-icon', FluentIcon);
|
||||||
localVue.component('woot-button', Button);
|
localVue.component('woot-button', Button);
|
||||||
|
|
||||||
const i18nConfig = new VueI18n({
|
const i18nConfig = new VueI18n({
|
||||||
|
|
|
@ -11,17 +11,19 @@ export const conversationUrl = ({
|
||||||
id,
|
id,
|
||||||
label,
|
label,
|
||||||
teamId,
|
teamId,
|
||||||
|
conversationType = '',
|
||||||
}) => {
|
}) => {
|
||||||
|
let url = `accounts/${accountId}/conversations/${id}`;
|
||||||
if (activeInbox) {
|
if (activeInbox) {
|
||||||
return `accounts/${accountId}/inbox/${activeInbox}/conversations/${id}`;
|
url = `accounts/${accountId}/inbox/${activeInbox}/conversations/${id}`;
|
||||||
|
} else if (label) {
|
||||||
|
url = `accounts/${accountId}/label/${label}/conversations/${id}`;
|
||||||
|
} else if (teamId) {
|
||||||
|
url = `accounts/${accountId}/team/${teamId}/conversations/${id}`;
|
||||||
|
} else if (conversationType === 'mention') {
|
||||||
|
url = `accounts/${accountId}/mentions/conversations/${id}`;
|
||||||
}
|
}
|
||||||
if (label) {
|
return url;
|
||||||
return `accounts/${accountId}/label/${label}/conversations/${id}`;
|
|
||||||
}
|
|
||||||
if (teamId) {
|
|
||||||
return `accounts/${accountId}/team/${teamId}/conversations/${id}`;
|
|
||||||
}
|
|
||||||
return `accounts/${accountId}/conversations/${id}`;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const accountIdFromPathname = pathname => {
|
export const accountIdFromPathname = pathname => {
|
||||||
|
|
|
@ -21,6 +21,7 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||||
'presence.update': this.onPresenceUpdate,
|
'presence.update': this.onPresenceUpdate,
|
||||||
'contact.deleted': this.onContactDelete,
|
'contact.deleted': this.onContactDelete,
|
||||||
'contact.updated': this.onContactUpdate,
|
'contact.updated': this.onContactUpdate,
|
||||||
|
'conversation.mentioned': this.onConversationMentioned,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +98,10 @@ class ActionCableConnector extends BaseActionCableConnector {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onConversationMentioned = data => {
|
||||||
|
this.app.$store.dispatch('addMentions', data);
|
||||||
|
};
|
||||||
|
|
||||||
clearTimer = conversationId => {
|
clearTimer = conversationId => {
|
||||||
const timerEvent = this.CancelTyping[conversationId];
|
const timerEvent = this.CancelTyping[conversationId];
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"404": "There are no active conversations in this group."
|
"404": "There are no active conversations in this group."
|
||||||
},
|
},
|
||||||
"TAB_HEADING": "Conversations",
|
"TAB_HEADING": "Conversations",
|
||||||
|
"MENTION_HEADING": "Mentions",
|
||||||
"SEARCH": {
|
"SEARCH": {
|
||||||
"INPUT": "Search for People, Chats, Saved Replies .."
|
"INPUT": "Search for People, Chats, Saved Replies .."
|
||||||
},
|
},
|
||||||
|
|
|
@ -136,6 +136,7 @@
|
||||||
"SIDEBAR": {
|
"SIDEBAR": {
|
||||||
"CONVERSATIONS": "Conversations",
|
"CONVERSATIONS": "Conversations",
|
||||||
"ALL_CONVERSATIONS": "All Conversations",
|
"ALL_CONVERSATIONS": "All Conversations",
|
||||||
|
"MENTIONED_CONVERSATIONS": "Mentions",
|
||||||
"REPORTS": "Reports",
|
"REPORTS": "Reports",
|
||||||
"SETTINGS": "Settings",
|
"SETTINGS": "Settings",
|
||||||
"CONTACTS": "Contacts",
|
"CONTACTS": "Contacts",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
:conversation-inbox="inboxId"
|
:conversation-inbox="inboxId"
|
||||||
:label="label"
|
:label="label"
|
||||||
:team-id="teamId"
|
:team-id="teamId"
|
||||||
|
:conversation-type="conversationType"
|
||||||
@conversation-load="onConversationLoad"
|
@conversation-load="onConversationLoad"
|
||||||
>
|
>
|
||||||
<pop-over-search />
|
<pop-over-search />
|
||||||
|
@ -49,6 +50,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
conversationType: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -13,15 +13,6 @@ export default {
|
||||||
return { inboxId: 0 };
|
return { inboxId: 0 };
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: frontendURL('accounts/:accountId/inbox/:inbox_id'),
|
|
||||||
name: 'inbox_dashboard',
|
|
||||||
roles: ['administrator', 'agent'],
|
|
||||||
component: ConversationView,
|
|
||||||
props: route => {
|
|
||||||
return { inboxId: route.params.inbox_id };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: frontendURL('accounts/:accountId/conversations/:conversation_id'),
|
path: frontendURL('accounts/:accountId/conversations/:conversation_id'),
|
||||||
name: 'inbox_conversation',
|
name: 'inbox_conversation',
|
||||||
|
@ -31,6 +22,15 @@ export default {
|
||||||
return { inboxId: 0, conversationId: route.params.conversation_id };
|
return { inboxId: 0, conversationId: route.params.conversation_id };
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: frontendURL('accounts/:accountId/inbox/:inbox_id'),
|
||||||
|
name: 'inbox_dashboard',
|
||||||
|
roles: ['administrator', 'agent'],
|
||||||
|
component: ConversationView,
|
||||||
|
props: route => {
|
||||||
|
return { inboxId: route.params.inbox_id };
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: frontendURL(
|
path: frontendURL(
|
||||||
'accounts/:accountId/inbox/:inbox_id/conversations/:conversation_id'
|
'accounts/:accountId/inbox/:inbox_id/conversations/:conversation_id'
|
||||||
|
@ -83,5 +83,24 @@ export default {
|
||||||
teamId: route.params.teamId,
|
teamId: route.params.teamId,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: frontendURL('accounts/:accountId/mentions/conversations'),
|
||||||
|
name: 'conversation_mentions',
|
||||||
|
roles: ['administrator', 'agent'],
|
||||||
|
component: ConversationView,
|
||||||
|
props: () => ({ conversationType: 'mention' }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: frontendURL(
|
||||||
|
'accounts/:accountId/mentions/conversations/:conversationId'
|
||||||
|
),
|
||||||
|
name: 'conversation_through_mentions',
|
||||||
|
roles: ['administrator', 'agent'],
|
||||||
|
component: ConversationView,
|
||||||
|
props: route => ({
|
||||||
|
conversationId: route.params.conversationId,
|
||||||
|
conversationType: 'mention',
|
||||||
|
}),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,43 +4,11 @@ import ConversationApi from '../../../api/inbox/conversation';
|
||||||
import MessageApi from '../../../api/inbox/message';
|
import MessageApi from '../../../api/inbox/message';
|
||||||
import { MESSAGE_STATUS, MESSAGE_TYPE } from 'shared/constants/messages';
|
import { MESSAGE_STATUS, MESSAGE_TYPE } from 'shared/constants/messages';
|
||||||
import { createPendingMessage } from 'dashboard/helper/commons';
|
import { createPendingMessage } from 'dashboard/helper/commons';
|
||||||
|
import {
|
||||||
|
buildConversationList,
|
||||||
|
isOnMentionsView,
|
||||||
|
} from './helpers/actionHelpers';
|
||||||
|
|
||||||
const setPageFilter = ({ dispatch, filter, page, markEndReached }) => {
|
|
||||||
dispatch('conversationPage/setCurrentPage', { filter, page }, { root: true });
|
|
||||||
if (markEndReached) {
|
|
||||||
dispatch('conversationPage/setEndReached', { filter }, { root: true });
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const setContacts = (commit, chatList) => {
|
|
||||||
commit(
|
|
||||||
`contacts/${types.SET_CONTACTS}`,
|
|
||||||
chatList.map(chat => chat.meta.sender)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildConversationList = (
|
|
||||||
context,
|
|
||||||
requestPayload,
|
|
||||||
responseData,
|
|
||||||
filterType
|
|
||||||
) => {
|
|
||||||
const { payload: conversationList, meta: metaData } = responseData;
|
|
||||||
context.commit(types.SET_ALL_CONVERSATION, conversationList);
|
|
||||||
context.dispatch('conversationStats/set', metaData);
|
|
||||||
context.dispatch(
|
|
||||||
'conversationLabels/setBulkConversationLabels',
|
|
||||||
conversationList
|
|
||||||
);
|
|
||||||
context.commit(types.CLEAR_LIST_LOADING_STATUS);
|
|
||||||
setContacts(context.commit, conversationList);
|
|
||||||
setPageFilter({
|
|
||||||
dispatch: context.dispatch,
|
|
||||||
filter: filterType,
|
|
||||||
page: requestPayload.page,
|
|
||||||
markEndReached: !conversationList.length,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// actions
|
// actions
|
||||||
const actions = {
|
const actions = {
|
||||||
getConversation: async ({ commit }, conversationId) => {
|
getConversation: async ({ commit }, conversationId) => {
|
||||||
|
@ -233,21 +201,32 @@ const actions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addConversation({ commit, state, dispatch }, conversation) {
|
addConversation({ commit, state, dispatch, rootState }, conversation) {
|
||||||
const { currentInbox, appliedFilters } = state;
|
const { currentInbox, appliedFilters } = state;
|
||||||
const {
|
const {
|
||||||
inbox_id: inboxId,
|
inbox_id: inboxId,
|
||||||
meta: { sender },
|
meta: { sender },
|
||||||
} = conversation;
|
} = conversation;
|
||||||
|
|
||||||
const hasAppliedFilters = !!appliedFilters.length;
|
const hasAppliedFilters = !!appliedFilters.length;
|
||||||
const isMatchingInboxFilter =
|
const isMatchingInboxFilter =
|
||||||
!currentInbox || Number(currentInbox) === inboxId;
|
!currentInbox || Number(currentInbox) === inboxId;
|
||||||
if (!hasAppliedFilters && isMatchingInboxFilter) {
|
if (
|
||||||
|
!hasAppliedFilters &&
|
||||||
|
!isOnMentionsView(rootState) &&
|
||||||
|
isMatchingInboxFilter
|
||||||
|
) {
|
||||||
commit(types.ADD_CONVERSATION, conversation);
|
commit(types.ADD_CONVERSATION, conversation);
|
||||||
dispatch('contacts/setContact', sender);
|
dispatch('contacts/setContact', sender);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addMentions({ dispatch, rootState }, conversation) {
|
||||||
|
if (isOnMentionsView(rootState)) {
|
||||||
|
dispatch('updateConversation', conversation);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
updateConversation({ commit, dispatch }, conversation) {
|
updateConversation({ commit, dispatch }, conversation) {
|
||||||
const {
|
const {
|
||||||
meta: { sender },
|
meta: { sender },
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
import types from '../../../mutation-types';
|
||||||
|
|
||||||
|
export const setPageFilter = ({ dispatch, filter, page, markEndReached }) => {
|
||||||
|
dispatch('conversationPage/setCurrentPage', { filter, page }, { root: true });
|
||||||
|
if (markEndReached) {
|
||||||
|
dispatch('conversationPage/setEndReached', { filter }, { root: true });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const setContacts = (commit, chatList) => {
|
||||||
|
commit(
|
||||||
|
`contacts/${types.SET_CONTACTS}`,
|
||||||
|
chatList.map(chat => chat.meta.sender)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const isOnMentionsView = ({ route: { name: routeName } }) => {
|
||||||
|
const MENTION_ROUTES = [
|
||||||
|
'conversation_mentions',
|
||||||
|
'conversation_through_mentions',
|
||||||
|
];
|
||||||
|
return MENTION_ROUTES.includes(routeName);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buildConversationList = (
|
||||||
|
context,
|
||||||
|
requestPayload,
|
||||||
|
responseData,
|
||||||
|
filterType
|
||||||
|
) => {
|
||||||
|
const { payload: conversationList, meta: metaData } = responseData;
|
||||||
|
context.commit(types.SET_ALL_CONVERSATION, conversationList);
|
||||||
|
context.dispatch('conversationStats/set', metaData);
|
||||||
|
context.dispatch(
|
||||||
|
'conversationLabels/setBulkConversationLabels',
|
||||||
|
conversationList
|
||||||
|
);
|
||||||
|
context.commit(types.CLEAR_LIST_LOADING_STATUS);
|
||||||
|
setContacts(context.commit, conversationList);
|
||||||
|
setPageFilter({
|
||||||
|
dispatch: context.dispatch,
|
||||||
|
filter: filterType,
|
||||||
|
page: requestPayload.page,
|
||||||
|
markEndReached: !conversationList.length,
|
||||||
|
});
|
||||||
|
};
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { isOnMentionsView } from '../actionHelpers';
|
||||||
|
|
||||||
|
describe('#isOnMentionsView', () => {
|
||||||
|
it('return valid responses when passing the state', () => {
|
||||||
|
expect(isOnMentionsView({ route: { name: 'conversation_mentions' } })).toBe(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
expect(isOnMentionsView({ route: { name: 'conversation_messages' } })).toBe(
|
||||||
|
false
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
|
@ -59,7 +59,10 @@ describe('#actions', () => {
|
||||||
messages: [],
|
messages: [],
|
||||||
meta: { sender: { id: 1, name: 'john-doe' } },
|
meta: { sender: { id: 1, name: 'john-doe' } },
|
||||||
};
|
};
|
||||||
actions.updateConversation({ commit, dispatch }, conversation);
|
actions.updateConversation(
|
||||||
|
{ commit, rootState: { route: { name: 'home' } }, dispatch },
|
||||||
|
conversation
|
||||||
|
);
|
||||||
expect(commit.mock.calls).toEqual([
|
expect(commit.mock.calls).toEqual([
|
||||||
[types.UPDATE_CONVERSATION, conversation],
|
[types.UPDATE_CONVERSATION, conversation],
|
||||||
]);
|
]);
|
||||||
|
@ -86,6 +89,7 @@ describe('#actions', () => {
|
||||||
actions.addConversation(
|
actions.addConversation(
|
||||||
{
|
{
|
||||||
commit,
|
commit,
|
||||||
|
rootState: { route: { name: 'home' } },
|
||||||
dispatch,
|
dispatch,
|
||||||
state: { currentInbox: 1, appliedFilters: [] },
|
state: { currentInbox: 1, appliedFilters: [] },
|
||||||
},
|
},
|
||||||
|
@ -105,6 +109,27 @@ describe('#actions', () => {
|
||||||
actions.addConversation(
|
actions.addConversation(
|
||||||
{
|
{
|
||||||
commit,
|
commit,
|
||||||
|
rootState: { route: { name: 'home' } },
|
||||||
|
dispatch,
|
||||||
|
state: { currentInbox: 1, appliedFilters: [{ id: 'random-filter' }] },
|
||||||
|
},
|
||||||
|
conversation
|
||||||
|
);
|
||||||
|
expect(commit.mock.calls).toEqual([]);
|
||||||
|
expect(dispatch.mock.calls).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('doesnot send mutation if the view is conversation mentions', () => {
|
||||||
|
const conversation = {
|
||||||
|
id: 1,
|
||||||
|
messages: [],
|
||||||
|
meta: { sender: { id: 1, name: 'john-doe' } },
|
||||||
|
inbox_id: 1,
|
||||||
|
};
|
||||||
|
actions.addConversation(
|
||||||
|
{
|
||||||
|
commit,
|
||||||
|
rootState: { route: { name: 'conversation_mentions' } },
|
||||||
dispatch,
|
dispatch,
|
||||||
state: { currentInbox: 1, appliedFilters: [{ id: 'random-filter' }] },
|
state: { currentInbox: 1, appliedFilters: [{ id: 'random-filter' }] },
|
||||||
},
|
},
|
||||||
|
@ -124,6 +149,7 @@ describe('#actions', () => {
|
||||||
actions.addConversation(
|
actions.addConversation(
|
||||||
{
|
{
|
||||||
commit,
|
commit,
|
||||||
|
rootState: { route: { name: 'home' } },
|
||||||
dispatch,
|
dispatch,
|
||||||
state: { currentInbox: 1, appliedFilters: [] },
|
state: { currentInbox: 1, appliedFilters: [] },
|
||||||
},
|
},
|
||||||
|
@ -151,7 +177,12 @@ describe('#actions', () => {
|
||||||
inbox_id: 1,
|
inbox_id: 1,
|
||||||
};
|
};
|
||||||
actions.addConversation(
|
actions.addConversation(
|
||||||
{ commit, dispatch, state: { appliedFilters: [] } },
|
{
|
||||||
|
commit,
|
||||||
|
rootState: { route: { name: 'home' } },
|
||||||
|
dispatch,
|
||||||
|
state: { appliedFilters: [] },
|
||||||
|
},
|
||||||
conversation
|
conversation
|
||||||
);
|
);
|
||||||
expect(commit.mock.calls).toEqual([
|
expect(commit.mock.calls).toEqual([
|
||||||
|
@ -379,3 +410,27 @@ describe('#deleteMessage', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('#addMentions', () => {
|
||||||
|
it('does not send mutations if the view is not mentions', () => {
|
||||||
|
actions.addMentions(
|
||||||
|
{ commit, dispatch, rootState: { route: { name: 'home' } } },
|
||||||
|
{ id: 1 }
|
||||||
|
);
|
||||||
|
expect(commit.mock.calls).toEqual([]);
|
||||||
|
expect(dispatch.mock.calls).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('send mutations if the view is mentions', () => {
|
||||||
|
actions.addMentions(
|
||||||
|
{
|
||||||
|
dispatch,
|
||||||
|
rootState: { route: { name: 'conversation_mentions' } },
|
||||||
|
},
|
||||||
|
{ id: 1, meta: { sender: { id: 1 } } }
|
||||||
|
);
|
||||||
|
expect(dispatch.mock.calls).toEqual([
|
||||||
|
['updateConversation', { id: 1, meta: { sender: { id: 1 } } }],
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"chat-multiple-outline": "M9.562 3a7.5 7.5 0 0 0-6.798 10.673l-.724 2.842a1.25 1.25 0 0 0 1.504 1.524c.75-.18 1.903-.457 2.93-.702A7.5 7.5 0 1 0 9.561 3Zm-6 7.5a6 6 0 1 1 3.33 5.375l-.244-.121-.264.063c-.923.22-1.99.475-2.788.667l.69-2.708.07-.276-.13-.253a5.971 5.971 0 0 1-.664-2.747Zm11 10.5c-1.97 0-3.762-.759-5.1-2h.1c.718 0 1.415-.089 2.08-.257.865.482 1.86.757 2.92.757.96 0 1.866-.225 2.67-.625l.243-.121.264.063c.922.22 1.966.445 2.74.61-.175-.751-.414-1.756-.642-2.651l-.07-.276.13-.253a5.971 5.971 0 0 0 .665-2.747 5.995 5.995 0 0 0-2.747-5.042 8.44 8.44 0 0 0-.8-2.047 7.503 7.503 0 0 1 4.344 10.263c.253 1.008.509 2.1.671 2.803a1.244 1.244 0 0 1-1.467 1.5 132.62 132.62 0 0 1-2.913-.64 7.476 7.476 0 0 1-3.088.663Z",
|
"chat-multiple-outline": "M9.562 3a7.5 7.5 0 0 0-6.798 10.673l-.724 2.842a1.25 1.25 0 0 0 1.504 1.524c.75-.18 1.903-.457 2.93-.702A7.5 7.5 0 1 0 9.561 3Zm-6 7.5a6 6 0 1 1 3.33 5.375l-.244-.121-.264.063c-.923.22-1.99.475-2.788.667l.69-2.708.07-.276-.13-.253a5.971 5.971 0 0 1-.664-2.747Zm11 10.5c-1.97 0-3.762-.759-5.1-2h.1c.718 0 1.415-.089 2.08-.257.865.482 1.86.757 2.92.757.96 0 1.866-.225 2.67-.625l.243-.121.264.063c.922.22 1.966.445 2.74.61-.175-.751-.414-1.756-.642-2.651l-.07-.276.13-.253a5.971 5.971 0 0 0 .665-2.747 5.995 5.995 0 0 0-2.747-5.042 8.44 8.44 0 0 0-.8-2.047 7.503 7.503 0 0 1 4.344 10.263c.253 1.008.509 2.1.671 2.803a1.244 1.244 0 0 1-1.467 1.5 132.62 132.62 0 0 1-2.913-.64 7.476 7.476 0 0 1-3.088.663Z",
|
||||||
"chat-outline": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10a9.96 9.96 0 0 1-4.587-1.112l-3.826 1.067a1.25 1.25 0 0 1-1.54-1.54l1.068-3.823A9.96 9.96 0 0 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5A8.5 8.5 0 0 0 3.5 12c0 1.47.373 2.883 1.073 4.137l.15.27-1.112 3.984 3.987-1.112.27.15A8.5 8.5 0 1 0 12 3.5ZM8.75 13h4.498a.75.75 0 0 1 .102 1.493l-.102.007H8.75a.75.75 0 0 1-.102-1.493L8.75 13h4.498H8.75Zm0-3.5h6.505a.75.75 0 0 1 .101 1.493l-.101.007H8.75a.75.75 0 0 1-.102-1.493L8.75 9.5h6.505H8.75Z",
|
"chat-outline": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10a9.96 9.96 0 0 1-4.587-1.112l-3.826 1.067a1.25 1.25 0 0 1-1.54-1.54l1.068-3.823A9.96 9.96 0 0 1 2 12C2 6.477 6.477 2 12 2Zm0 1.5A8.5 8.5 0 0 0 3.5 12c0 1.47.373 2.883 1.073 4.137l.15.27-1.112 3.984 3.987-1.112.27.15A8.5 8.5 0 1 0 12 3.5ZM8.75 13h4.498a.75.75 0 0 1 .102 1.493l-.102.007H8.75a.75.75 0 0 1-.102-1.493L8.75 13h4.498H8.75Zm0-3.5h6.505a.75.75 0 0 1 .101 1.493l-.101.007H8.75a.75.75 0 0 1-.102-1.493L8.75 9.5h6.505H8.75Z",
|
||||||
"checkmark-circle-outline": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm-1.25 9.94 4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084-5 5a.75.75 0 0 1-.976.073l-.084-.073-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073 1.97 1.97 4.47-4.47-4.47 4.47Z",
|
"checkmark-circle-outline": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm-1.25 9.94 4.47-4.47a.75.75 0 0 1 1.133.976l-.073.084-5 5a.75.75 0 0 1-.976.073l-.084-.073-2.5-2.5a.75.75 0 0 1 .976-1.133l.084.073 1.97 1.97 4.47-4.47-4.47 4.47Z",
|
||||||
|
"checkmark-circle-solid": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm3.22 6.97-4.47 4.47-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5a.75.75 0 1 0-1.06-1.06Z",
|
||||||
"checkmark-outline": "M4.53 12.97a.75.75 0 0 0-1.06 1.06l4.5 4.5a.75.75 0 0 0 1.06 0l11-11a.75.75 0 0 0-1.06-1.06L8.5 16.94l-3.97-3.97Z",
|
"checkmark-outline": "M4.53 12.97a.75.75 0 0 0-1.06 1.06l4.5 4.5a.75.75 0 0 0 1.06 0l11-11a.75.75 0 0 0-1.06-1.06L8.5 16.94l-3.97-3.97Z",
|
||||||
"chevron-down-outline": "M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06Z",
|
"chevron-down-outline": "M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06Z",
|
||||||
"chevron-left-outline": "M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0Z",
|
"chevron-left-outline": "M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0Z",
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
"mail-outline": "M5.25 4h13.5a3.25 3.25 0 0 1 3.245 3.066L22 7.25v9.5a3.25 3.25 0 0 1-3.066 3.245L18.75 20H5.25a3.25 3.25 0 0 1-3.245-3.066L2 16.75v-9.5a3.25 3.25 0 0 1 3.066-3.245L5.25 4h13.5-13.5ZM20.5 9.373l-8.15 4.29a.75.75 0 0 1-.603.043l-.096-.042L3.5 9.374v7.376a1.75 1.75 0 0 0 1.606 1.744l.144.006h13.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V9.373ZM18.75 5.5H5.25a1.75 1.75 0 0 0-1.744 1.606L3.5 7.25v.429l8.5 4.473 8.5-4.474V7.25a1.75 1.75 0 0 0-1.607-1.744L18.75 5.5Z",
|
"mail-outline": "M5.25 4h13.5a3.25 3.25 0 0 1 3.245 3.066L22 7.25v9.5a3.25 3.25 0 0 1-3.066 3.245L18.75 20H5.25a3.25 3.25 0 0 1-3.245-3.066L2 16.75v-9.5a3.25 3.25 0 0 1 3.066-3.245L5.25 4h13.5-13.5ZM20.5 9.373l-8.15 4.29a.75.75 0 0 1-.603.043l-.096-.042L3.5 9.374v7.376a1.75 1.75 0 0 0 1.606 1.744l.144.006h13.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V9.373ZM18.75 5.5H5.25a1.75 1.75 0 0 0-1.744 1.606L3.5 7.25v.429l8.5 4.473 8.5-4.474V7.25a1.75 1.75 0 0 0-1.607-1.744L18.75 5.5Z",
|
||||||
"map-outline": "m9.203 4 .047-.002.046.001a.73.73 0 0 1 .067.007l.016.004c.086.014.17.044.252.092l.051.034 5.07 3.565L19.82 4.14a.75.75 0 0 1 1.174.51l.007.104v10.632a.75.75 0 0 1-.238.548l-.08.066-5.5 3.866a.744.744 0 0 1-.828.023L9.25 16.297l-5.07 3.565a.75.75 0 0 1-1.174-.51l-.007-.104V8.616a.75.75 0 0 1 .238-.548l.08-.066 5.5-3.866a.762.762 0 0 1 .2-.101l.122-.028.064-.008Zm10.298 2.197-4 2.812v8.799l4-2.812v-8.8ZM8.5 6.193l-4 2.812v8.8l4-2.813V6.193Zm1.502 0v8.8l4 2.811V9.005l-4-2.812Z",
|
"map-outline": "m9.203 4 .047-.002.046.001a.73.73 0 0 1 .067.007l.016.004c.086.014.17.044.252.092l.051.034 5.07 3.565L19.82 4.14a.75.75 0 0 1 1.174.51l.007.104v10.632a.75.75 0 0 1-.238.548l-.08.066-5.5 3.866a.744.744 0 0 1-.828.023L9.25 16.297l-5.07 3.565a.75.75 0 0 1-1.174-.51l-.007-.104V8.616a.75.75 0 0 1 .238-.548l.08-.066 5.5-3.866a.762.762 0 0 1 .2-.101l.122-.028.064-.008Zm10.298 2.197-4 2.812v8.799l4-2.812v-8.8ZM8.5 6.193l-4 2.812v8.8l4-2.813V6.193Zm1.502 0v8.8l4 2.811V9.005l-4-2.812Z",
|
||||||
"megaphone-outline": "M21.907 5.622c.062.208.093.424.093.641V17.74a2.25 2.25 0 0 1-2.891 2.156l-5.514-1.64a4.002 4.002 0 0 1-7.59-1.556L6 16.5l-.001-.5-2.39-.711A2.25 2.25 0 0 1 2 13.131V10.87a2.25 2.25 0 0 1 1.61-2.156l15.5-4.606a2.25 2.25 0 0 1 2.797 1.515ZM7.499 16.445l.001.054a2.5 2.5 0 0 0 4.624 1.321l-4.625-1.375Zm12.037-10.9-15.5 4.605a.75.75 0 0 0-.536.72v2.261a.75.75 0 0 0 .536.72l15.5 4.607a.75.75 0 0 0 .964-.72V6.264a.75.75 0 0 0-.964-.719Z",
|
"megaphone-outline": "M21.907 5.622c.062.208.093.424.093.641V17.74a2.25 2.25 0 0 1-2.891 2.156l-5.514-1.64a4.002 4.002 0 0 1-7.59-1.556L6 16.5l-.001-.5-2.39-.711A2.25 2.25 0 0 1 2 13.131V10.87a2.25 2.25 0 0 1 1.61-2.156l15.5-4.606a2.25 2.25 0 0 1 2.797 1.515ZM7.499 16.445l.001.054a2.5 2.5 0 0 0 4.624 1.321l-4.625-1.375Zm12.037-10.9-15.5 4.605a.75.75 0 0 0-.536.72v2.261a.75.75 0 0 0 .536.72l15.5 4.607a.75.75 0 0 0 .964-.72V6.264a.75.75 0 0 0-.964-.719Z",
|
||||||
|
"mention-outline": "M22 12v1.75a3.75 3.75 0 0 1-7.149 1.586C14.033 16.356 12.84 17 11.5 17 8.992 17 7 14.742 7 12s1.992-5 4.5-5c1.159 0 2.208.482 3.001 1.272L14.5 7.75a.75.75 0 0 1 1.493-.102L16 7.75v6a2.25 2.25 0 0 0 4.495.154l.005-.154V12a8.5 8.5 0 1 0-5.515 7.961.75.75 0 0 1 .527 1.405A9.98 9.98 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2c5.43 0 9.848 4.327 9.996 9.72L22 12v1.75V12ZM11.5 8.5c-1.635 0-3 1.548-3 3.5s1.365 3.5 3 3.5c1.634 0 3-1.548 3-3.5s-1.366-3.5-3-3.5Z",
|
||||||
"merge-outline": "M3 6.75A.75.75 0 0 1 3.75 6h4.5a.75.75 0 0 1 .53.22L13.56 11h5.878L15.72 7.28a.75.75 0 1 1 1.06-1.06l4.998 5a.75.75 0 0 1 0 1.06l-4.998 5a.75.75 0 1 1-1.06-1.06l3.718-3.72H13.56l-4.78 4.78a.75.75 0 0 1-.531.22h-4.5a.75.75 0 0 1 0-1.5h4.19l4.25-4.25L7.94 7.5H3.75A.75.75 0 0 1 3 6.75Z",
|
"merge-outline": "M3 6.75A.75.75 0 0 1 3.75 6h4.5a.75.75 0 0 1 .53.22L13.56 11h5.878L15.72 7.28a.75.75 0 1 1 1.06-1.06l4.998 5a.75.75 0 0 1 0 1.06l-4.998 5a.75.75 0 1 1-1.06-1.06l3.718-3.72H13.56l-4.78 4.78a.75.75 0 0 1-.531.22h-4.5a.75.75 0 0 1 0-1.5h4.19l4.25-4.25L7.94 7.5H3.75A.75.75 0 0 1 3 6.75Z",
|
||||||
"more-horizontal-outline": "M7.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM13.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM18 13.75a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",
|
"more-horizontal-outline": "M7.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM13.75 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM18 13.75a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",
|
||||||
"more-vertical-outline": "M12 7.75a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 13.75a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM10.25 18a1.75 1.75 0 1 0 3.5 0 1.75 1.75 0 0 0-3.5 0Z",
|
"more-vertical-outline": "M12 7.75a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 13.75a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM10.25 18a1.75 1.75 0 1 0 3.5 0 1.75 1.75 0 0 0-3.5 0Z",
|
||||||
|
@ -60,6 +62,7 @@
|
||||||
"open-outline": "M6.25 4.5A1.75 1.75 0 0 0 4.5 6.25v11.5c0 .966.783 1.75 1.75 1.75h11.5a1.75 1.75 0 0 0 1.75-1.75v-4a.75.75 0 0 1 1.5 0v4A3.25 3.25 0 0 1 17.75 21H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h4a.75.75 0 0 1 0 1.5h-4ZM13 3.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 .75.75v6.5a.75.75 0 0 1-1.5 0V5.56l-5.22 5.22a.75.75 0 0 1-1.06-1.06l5.22-5.22h-4.69a.75.75 0 0 1-.75-.75Z",
|
"open-outline": "M6.25 4.5A1.75 1.75 0 0 0 4.5 6.25v11.5c0 .966.783 1.75 1.75 1.75h11.5a1.75 1.75 0 0 0 1.75-1.75v-4a.75.75 0 0 1 1.5 0v4A3.25 3.25 0 0 1 17.75 21H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h4a.75.75 0 0 1 0 1.5h-4ZM13 3.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 .75.75v6.5a.75.75 0 0 1-1.5 0V5.56l-5.22 5.22a.75.75 0 0 1-1.06-1.06l5.22-5.22h-4.69a.75.75 0 0 1-.75-.75Z",
|
||||||
"people-outline": "M4 13.999 13 14a2 2 0 0 1 1.995 1.85L15 16v1.5C14.999 21 11.284 22 8.5 22c-2.722 0-6.335-.956-6.495-4.27L2 17.5v-1.501c0-1.054.816-1.918 1.85-1.995L4 14ZM15.22 14H20c1.054 0 1.918.816 1.994 1.85L22 16v1c-.001 3.062-2.858 4-5 4a7.16 7.16 0 0 1-2.14-.322c.336-.386.607-.827.802-1.327A6.19 6.19 0 0 0 17 19.5l.267-.006c.985-.043 3.086-.363 3.226-2.289L20.5 17v-1a.501.501 0 0 0-.41-.492L20 15.5h-4.051a2.957 2.957 0 0 0-.595-1.34L15.22 14H20h-4.78ZM4 15.499l-.1.01a.51.51 0 0 0-.254.136.506.506 0 0 0-.136.253l-.01.101V17.5c0 1.009.45 1.722 1.417 2.242.826.445 2.003.714 3.266.753l.317.005.317-.005c1.263-.039 2.439-.308 3.266-.753.906-.488 1.359-1.145 1.412-2.057l.005-.186V16a.501.501 0 0 0-.41-.492L13 15.5l-9-.001ZM8.5 3a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm9 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm-9-.5c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3Zm9 2c-1.103 0-2 .897-2 2s.897 2 2 2 2-.897 2-2-.897-2-2-2Z",
|
"people-outline": "M4 13.999 13 14a2 2 0 0 1 1.995 1.85L15 16v1.5C14.999 21 11.284 22 8.5 22c-2.722 0-6.335-.956-6.495-4.27L2 17.5v-1.501c0-1.054.816-1.918 1.85-1.995L4 14ZM15.22 14H20c1.054 0 1.918.816 1.994 1.85L22 16v1c-.001 3.062-2.858 4-5 4a7.16 7.16 0 0 1-2.14-.322c.336-.386.607-.827.802-1.327A6.19 6.19 0 0 0 17 19.5l.267-.006c.985-.043 3.086-.363 3.226-2.289L20.5 17v-1a.501.501 0 0 0-.41-.492L20 15.5h-4.051a2.957 2.957 0 0 0-.595-1.34L15.22 14H20h-4.78ZM4 15.499l-.1.01a.51.51 0 0 0-.254.136.506.506 0 0 0-.136.253l-.01.101V17.5c0 1.009.45 1.722 1.417 2.242.826.445 2.003.714 3.266.753l.317.005.317-.005c1.263-.039 2.439-.308 3.266-.753.906-.488 1.359-1.145 1.412-2.057l.005-.186V16a.501.501 0 0 0-.41-.492L13 15.5l-9-.001ZM8.5 3a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm9 2a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm-9-.5c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3Zm9 2c-1.103 0-2 .897-2 2s.897 2 2 2 2-.897 2-2-.897-2-2-2Z",
|
||||||
"people-team-outline": "M14.754 10c.966 0 1.75.784 1.75 1.75v4.749a4.501 4.501 0 0 1-9.002 0V11.75c0-.966.783-1.75 1.75-1.75h5.502Zm0 1.5H9.252a.25.25 0 0 0-.25.25v4.749a3.001 3.001 0 0 0 6.002 0V11.75a.25.25 0 0 0-.25-.25ZM3.75 10h3.381a2.738 2.738 0 0 0-.618 1.5H3.75a.25.25 0 0 0-.25.25v3.249a2.501 2.501 0 0 0 3.082 2.433c.085.504.24.985.453 1.432A4.001 4.001 0 0 1 2 14.999V11.75c0-.966.784-1.75 1.75-1.75Zm13.125 0h3.375c.966 0 1.75.784 1.75 1.75V15a4 4 0 0 1-5.03 3.866c.214-.448.369-.929.455-1.433A2.5 2.5 0 0 0 20.5 15v-3.25a.25.25 0 0 0-.25-.25h-2.757a2.738 2.738 0 0 0-.618-1.5ZM12 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm6.5 1a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-13 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm6.5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm6.5 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-13 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",
|
"people-team-outline": "M14.754 10c.966 0 1.75.784 1.75 1.75v4.749a4.501 4.501 0 0 1-9.002 0V11.75c0-.966.783-1.75 1.75-1.75h5.502Zm0 1.5H9.252a.25.25 0 0 0-.25.25v4.749a3.001 3.001 0 0 0 6.002 0V11.75a.25.25 0 0 0-.25-.25ZM3.75 10h3.381a2.738 2.738 0 0 0-.618 1.5H3.75a.25.25 0 0 0-.25.25v3.249a2.501 2.501 0 0 0 3.082 2.433c.085.504.24.985.453 1.432A4.001 4.001 0 0 1 2 14.999V11.75c0-.966.784-1.75 1.75-1.75Zm13.125 0h3.375c.966 0 1.75.784 1.75 1.75V15a4 4 0 0 1-5.03 3.866c.214-.448.369-.929.455-1.433A2.5 2.5 0 0 0 20.5 15v-3.25a.25.25 0 0 0-.25-.25h-2.757a2.738 2.738 0 0 0-.618-1.5ZM12 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm6.5 1a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm-13 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm6.5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm6.5 1a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-13 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",
|
||||||
|
"person-add-outline": "M17.5 12a5.5 5.5 0 1 1 0 11a5.5 5.5 0 0 1 0-11zm-5.477 2a6.47 6.47 0 0 0-.709 1.5H4.253a.749.749 0 0 0-.75.75v.577c0 .535.192 1.053.54 1.46c1.253 1.469 3.22 2.214 5.957 2.214c.597 0 1.157-.035 1.68-.106c.246.495.553.954.912 1.367c-.795.16-1.66.24-2.592.24c-3.146 0-5.532-.906-7.098-2.74a3.75 3.75 0 0 1-.898-2.435v-.578A2.249 2.249 0 0 1 4.253 14h7.77zm5.477 0l-.09.008a.5.5 0 0 0-.402.402L17 14.5V17h-2.496l-.09.008a.5.5 0 0 0-.402.402l-.008.09l.008.09a.5.5 0 0 0 .402.402l.09.008H17L17 20.5l.008.09a.5.5 0 0 0 .402.402l.09.008l.09-.008a.5.5 0 0 0 .402-.402L18 20.5V18h2.504l.09-.008a.5.5 0 0 0 .402-.402l.008-.09l-.008-.09a.5.5 0 0 0-.402-.402l-.09-.008H18L18 14.5l-.008-.09a.5.5 0 0 0-.402-.402L17.5 14zM10 2.005a5 5 0 1 1 0 10a5 5 0 0 1 0-10zm0 1.5a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7z",
|
||||||
"person-outline": "M17.754 14a2.249 2.249 0 0 1 2.25 2.249v.575c0 .894-.32 1.76-.902 2.438-1.57 1.834-3.957 2.739-7.102 2.739-3.146 0-5.532-.905-7.098-2.74a3.75 3.75 0 0 1-.898-2.435v-.577a2.249 2.249 0 0 1 2.249-2.25h11.501Zm0 1.5H6.253a.749.749 0 0 0-.75.749v.577c0 .536.192 1.054.54 1.461 1.253 1.468 3.219 2.214 5.957 2.214s4.706-.746 5.962-2.214a2.25 2.25 0 0 0 .541-1.463v-.575a.749.749 0 0 0-.749-.75ZM12 2.004a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 1.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z",
|
"person-outline": "M17.754 14a2.249 2.249 0 0 1 2.25 2.249v.575c0 .894-.32 1.76-.902 2.438-1.57 1.834-3.957 2.739-7.102 2.739-3.146 0-5.532-.905-7.098-2.74a3.75 3.75 0 0 1-.898-2.435v-.577a2.249 2.249 0 0 1 2.249-2.25h11.501Zm0 1.5H6.253a.749.749 0 0 0-.75.749v.577c0 .536.192 1.054.54 1.461 1.253 1.468 3.219 2.214 5.957 2.214s4.706-.746 5.962-2.214a2.25 2.25 0 0 0 .541-1.463v-.575a.749.749 0 0 0-.749-.75ZM12 2.004a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 1.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z",
|
||||||
"power-outline": "M8.204 4.82a.75.75 0 0 1 .634 1.36A7.51 7.51 0 0 0 4.5 12.991c0 4.148 3.358 7.51 7.499 7.51s7.499-3.362 7.499-7.51a7.51 7.51 0 0 0-4.323-6.804.75.75 0 1 1 .637-1.358 9.01 9.01 0 0 1 5.186 8.162c0 4.976-4.029 9.01-9 9.01C7.029 22 3 17.966 3 12.99a9.01 9.01 0 0 1 5.204-8.17ZM12 2.496a.75.75 0 0 1 .743.648l.007.102v7.5a.75.75 0 0 1-1.493.102l-.007-.102v-7.5a.75.75 0 0 1 .75-.75Z",
|
"power-outline": "M8.204 4.82a.75.75 0 0 1 .634 1.36A7.51 7.51 0 0 0 4.5 12.991c0 4.148 3.358 7.51 7.499 7.51s7.499-3.362 7.499-7.51a7.51 7.51 0 0 0-4.323-6.804.75.75 0 1 1 .637-1.358 9.01 9.01 0 0 1 5.186 8.162c0 4.976-4.029 9.01-9 9.01C7.029 22 3 17.966 3 12.99a9.01 9.01 0 0 1 5.204-8.17ZM12 2.496a.75.75 0 0 1 .743.648l.007.102v7.5a.75.75 0 0 1-1.493.102l-.007-.102v-7.5a.75.75 0 0 1 .75-.75Z",
|
||||||
"quote-outline": "M7.5 6a2.5 2.5 0 0 1 2.495 2.336l.005.206c-.01 3.555-1.24 6.614-3.705 9.223a.75.75 0 1 1-1.09-1.03c1.64-1.737 2.66-3.674 3.077-5.859A2.5 2.5 0 1 1 7.5 6Zm9 0a2.5 2.5 0 0 1 2.495 2.336l.005.206c-.01 3.56-1.238 6.614-3.705 9.223a.75.75 0 1 1-1.09-1.03c1.643-1.738 2.662-3.672 3.078-5.859A2.5 2.5 0 1 1 16.5 6Zm-9 1.5a1 1 0 1 0 .993 1.117l.007-.124a1 1 0 0 0-1-.993Zm9 0a1 1 0 1 0 .993 1.117l.007-.124a1 1 0 0 0-1-.993Z",
|
"quote-outline": "M7.5 6a2.5 2.5 0 0 1 2.495 2.336l.005.206c-.01 3.555-1.24 6.614-3.705 9.223a.75.75 0 1 1-1.09-1.03c1.64-1.737 2.66-3.674 3.077-5.859A2.5 2.5 0 1 1 7.5 6Zm9 0a2.5 2.5 0 0 1 2.495 2.336l.005.206c-.01 3.56-1.238 6.614-3.705 9.223a.75.75 0 1 1-1.09-1.03c1.643-1.738 2.662-3.672 3.078-5.859A2.5 2.5 0 1 1 16.5 6Zm-9 1.5a1 1 0 1 0 .993 1.117l.007-.124a1 1 0 0 0-1-.993Zm9 0a1 1 0 1 0 .993 1.117l.007-.124a1 1 0 0 0-1-.993Z",
|
||||||
|
@ -72,22 +75,21 @@
|
||||||
"speaker-1-outline": "M14.704 3.442c.191.226.296.512.296.808v15.502a1.25 1.25 0 0 1-2.058.954L7.975 16.5H4.25A2.25 2.25 0 0 1 2 14.25v-4.5A2.25 2.25 0 0 1 4.25 7.5h3.725l4.968-4.204a1.25 1.25 0 0 1 1.761.147ZM13.5 4.79 8.525 9H4.25a.75.75 0 0 0-.75.75v4.5c0 .415.336.75.75.75h4.275l4.975 4.213V4.79Zm3.604 3.851a.75.75 0 0 1 1.03.25c.574.94.862 1.992.862 3.14 0 1.149-.288 2.201-.862 3.141a.75.75 0 1 1-1.28-.781c.428-.702.642-1.483.642-2.36 0-.876-.214-1.657-.642-2.359a.75.75 0 0 1 .25-1.03Z",
|
"speaker-1-outline": "M14.704 3.442c.191.226.296.512.296.808v15.502a1.25 1.25 0 0 1-2.058.954L7.975 16.5H4.25A2.25 2.25 0 0 1 2 14.25v-4.5A2.25 2.25 0 0 1 4.25 7.5h3.725l4.968-4.204a1.25 1.25 0 0 1 1.761.147ZM13.5 4.79 8.525 9H4.25a.75.75 0 0 0-.75.75v4.5c0 .415.336.75.75.75h4.275l4.975 4.213V4.79Zm3.604 3.851a.75.75 0 0 1 1.03.25c.574.94.862 1.992.862 3.14 0 1.149-.288 2.201-.862 3.141a.75.75 0 1 1-1.28-.781c.428-.702.642-1.483.642-2.36 0-.876-.214-1.657-.642-2.359a.75.75 0 0 1 .25-1.03Z",
|
||||||
"speaker-mute-outline": "M12.92 3.316c.806-.717 2.08-.145 2.08.934v15.496c0 1.078-1.274 1.65-2.08.934l-4.492-3.994a.75.75 0 0 0-.498-.19H4.25A2.25 2.25 0 0 1 2 14.247V9.75a2.25 2.25 0 0 1 2.25-2.25h3.68a.75.75 0 0 0 .498-.19l4.491-3.993Zm.58 1.49L9.425 8.43A2.25 2.25 0 0 1 7.93 9H4.25a.75.75 0 0 0-.75.75v4.497c0 .415.336.75.75.75h3.68a2.25 2.25 0 0 1 1.495.57l4.075 3.623V4.807ZM16.22 9.22a.75.75 0 0 1 1.06 0L19 10.94l1.72-1.72a.75.75 0 1 1 1.06 1.06L20.06 12l1.72 1.72a.75.75 0 1 1-1.06 1.06L19 13.06l-1.72 1.72a.75.75 0 1 1-1.06-1.06L17.94 12l-1.72-1.72a.75.75 0 0 1 0-1.06Z",
|
"speaker-mute-outline": "M12.92 3.316c.806-.717 2.08-.145 2.08.934v15.496c0 1.078-1.274 1.65-2.08.934l-4.492-3.994a.75.75 0 0 0-.498-.19H4.25A2.25 2.25 0 0 1 2 14.247V9.75a2.25 2.25 0 0 1 2.25-2.25h3.68a.75.75 0 0 0 .498-.19l4.491-3.993Zm.58 1.49L9.425 8.43A2.25 2.25 0 0 1 7.93 9H4.25a.75.75 0 0 0-.75.75v4.497c0 .415.336.75.75.75h3.68a2.25 2.25 0 0 1 1.495.57l4.075 3.623V4.807ZM16.22 9.22a.75.75 0 0 1 1.06 0L19 10.94l1.72-1.72a.75.75 0 1 1 1.06 1.06L20.06 12l1.72 1.72a.75.75 0 1 1-1.06 1.06L19 13.06l-1.72 1.72a.75.75 0 1 1-1.06-1.06L17.94 12l-1.72-1.72a.75.75 0 0 1 0-1.06Z",
|
||||||
"star-emphasis-outline": "M13.209 3.103c-.495-1.004-1.926-1.004-2.421 0L8.43 7.88l-5.273.766c-1.107.161-1.55 1.522-.748 2.303l3.815 3.72-.9 5.25c-.19 1.103.968 1.944 1.959 1.424l4.715-2.48 4.716 2.48c.99.52 2.148-.32 1.96-1.424l-.902-5.25 3.816-3.72c.8-.78.359-2.142-.748-2.303l-5.273-.766-2.358-4.777ZM9.74 8.615l2.258-4.576 2.259 4.576a1.35 1.35 0 0 0 1.016.738l5.05.734-3.654 3.562a1.35 1.35 0 0 0-.388 1.195l.862 5.03-4.516-2.375a1.35 1.35 0 0 0-1.257 0l-4.516 2.374.862-5.029a1.35 1.35 0 0 0-.388-1.195l-3.654-3.562 5.05-.734c.44-.063.82-.34 1.016-.738ZM1.164 3.782a.75.75 0 0 0 .118 1.054l2.5 2a.75.75 0 1 0 .937-1.172l-2.5-2a.75.75 0 0 0-1.055.118Z M22.836 18.218a.75.75 0 0 0-.117-1.054l-2.5-2a.75.75 0 0 0-.938 1.172l2.5 2a.75.75 0 0 0 1.055-.117ZM1.282 17.164a.75.75 0 1 0 .937 1.172l2.5-2a.75.75 0 0 0-.937-1.172l-2.5 2ZM22.836 3.782a.75.75 0 0 1-.117 1.054l-2.5 2a.75.75 0 0 1-.938-1.172l2.5-2a.75.75 0 0 1 1.055.118Z",
|
"star-emphasis-outline": "M13.209 3.103c-.495-1.004-1.926-1.004-2.421 0L8.43 7.88l-5.273.766c-1.107.161-1.55 1.522-.748 2.303l3.815 3.72-.9 5.25c-.19 1.103.968 1.944 1.959 1.424l4.715-2.48 4.716 2.48c.99.52 2.148-.32 1.96-1.424l-.902-5.25 3.816-3.72c.8-.78.359-2.142-.748-2.303l-5.273-.766-2.358-4.777ZM9.74 8.615l2.258-4.576 2.259 4.576a1.35 1.35 0 0 0 1.016.738l5.05.734-3.654 3.562a1.35 1.35 0 0 0-.388 1.195l.862 5.03-4.516-2.375a1.35 1.35 0 0 0-1.257 0l-4.516 2.374.862-5.029a1.35 1.35 0 0 0-.388-1.195l-3.654-3.562 5.05-.734c.44-.063.82-.34 1.016-.738ZM1.164 3.782a.75.75 0 0 0 .118 1.054l2.5 2a.75.75 0 1 0 .937-1.172l-2.5-2a.75.75 0 0 0-1.055.118Z M22.836 18.218a.75.75 0 0 0-.117-1.054l-2.5-2a.75.75 0 0 0-.938 1.172l2.5 2a.75.75 0 0 0 1.055-.117ZM1.282 17.164a.75.75 0 1 0 .937 1.172l2.5-2a.75.75 0 0 0-.937-1.172l-2.5 2ZM22.836 3.782a.75.75 0 0 1-.117 1.054l-2.5 2a.75.75 0 0 1-.938-1.172l2.5-2a.75.75 0 0 1 1.055.118Z",
|
||||||
|
"subtract-outline": "M3.997 13H20a1 1 0 1 0 0-2H3.997a1 1 0 1 0 0 2Z",
|
||||||
"tag-outline": "M19.75 2A2.25 2.25 0 0 1 22 4.25v5.462a3.25 3.25 0 0 1-.952 2.298l-8.5 8.503a3.255 3.255 0 0 1-4.597.001L3.489 16.06a3.25 3.25 0 0 1-.003-4.596l8.5-8.51A3.25 3.25 0 0 1 14.284 2h5.465Zm0 1.5h-5.465c-.465 0-.91.185-1.239.513l-8.512 8.523a1.75 1.75 0 0 0 .015 2.462l4.461 4.454a1.755 1.755 0 0 0 2.477 0l8.5-8.503a1.75 1.75 0 0 0 .513-1.237V4.25a.75.75 0 0 0-.75-.75ZM17 5.502a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z",
|
"tag-outline": "M19.75 2A2.25 2.25 0 0 1 22 4.25v5.462a3.25 3.25 0 0 1-.952 2.298l-8.5 8.503a3.255 3.255 0 0 1-4.597.001L3.489 16.06a3.25 3.25 0 0 1-.003-4.596l8.5-8.51A3.25 3.25 0 0 1 14.284 2h5.465Zm0 1.5h-5.465c-.465 0-.91.185-1.239.513l-8.512 8.523a1.75 1.75 0 0 0 .015 2.462l4.461 4.454a1.755 1.755 0 0 0 2.477 0l8.5-8.503a1.75 1.75 0 0 0 .513-1.237V4.25a.75.75 0 0 0-.75-.75ZM17 5.502a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z",
|
||||||
|
"upload-outline": "M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552 6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713 4.25 4.25 0 0 0-8.489 0 .75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087ZM22 16.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Zm-6-1.793V19.5a.5.5 0 0 0 1 0v-4.793l1.646 1.647a.5.5 0 0 0 .708-.708l-2.5-2.5a.5.5 0 0 0-.708 0l-2.5 2.5a.5.5 0 0 0 .708.708L16 14.707Z",
|
||||||
"video-outline": "M13.75 4.5A3.25 3.25 0 0 1 17 7.75v.173l3.864-2.318A.75.75 0 0 1 22 6.248V17.75a.75.75 0 0 1-1.136.643L17 16.075v.175a3.25 3.25 0 0 1-3.25 3.25h-8.5A3.25 3.25 0 0 1 2 16.25v-8.5A3.25 3.25 0 0 1 5.25 4.5h8.5Zm0 1.5h-8.5A1.75 1.75 0 0 0 3.5 7.75v8.5c0 .966.784 1.75 1.75 1.75h8.5a1.75 1.75 0 0 0 1.75-1.75v-8.5A1.75 1.75 0 0 0 13.75 6Zm6.75 1.573L17 9.674v4.651l3.5 2.1V7.573Z",
|
"video-outline": "M13.75 4.5A3.25 3.25 0 0 1 17 7.75v.173l3.864-2.318A.75.75 0 0 1 22 6.248V17.75a.75.75 0 0 1-1.136.643L17 16.075v.175a3.25 3.25 0 0 1-3.25 3.25h-8.5A3.25 3.25 0 0 1 2 16.25v-8.5A3.25 3.25 0 0 1 5.25 4.5h8.5Zm0 1.5h-8.5A1.75 1.75 0 0 0 3.5 7.75v8.5c0 .966.784 1.75 1.75 1.75h8.5a1.75 1.75 0 0 0 1.75-1.75v-8.5A1.75 1.75 0 0 0 13.75 6Zm6.75 1.573L17 9.674v4.651l3.5 2.1V7.573Z",
|
||||||
"warning-outline": "M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138 7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878Zm9.505 15.613-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086-7.76-14.008 7.76 14.008ZM12 16.002a.999.999 0 1 1 0 1.997.999.999 0 0 1 0-1.997ZM11.995 8.5a.75.75 0 0 1 .744.647l.007.102.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102-.004-4.502a.75.75 0 0 1 .75-.75Z",
|
"warning-outline": "M10.91 2.782a2.25 2.25 0 0 1 2.975.74l.083.138 7.759 14.009a2.25 2.25 0 0 1-1.814 3.334l-.154.006H4.243a2.25 2.25 0 0 1-2.041-3.197l.072-.143L10.031 3.66a2.25 2.25 0 0 1 .878-.878Zm9.505 15.613-7.76-14.008a.75.75 0 0 0-1.254-.088l-.057.088-7.757 14.008a.75.75 0 0 0 .561 1.108l.095.006h15.516a.75.75 0 0 0 .696-1.028l-.04-.086-7.76-14.008 7.76 14.008ZM12 16.002a.999.999 0 1 1 0 1.997.999.999 0 0 1 0-1.997ZM11.995 8.5a.75.75 0 0 1 .744.647l.007.102.004 4.502a.75.75 0 0 1-1.494.103l-.006-.102-.004-4.502a.75.75 0 0 1 .75-.75Z",
|
||||||
"wifi-off-outline": "m12.858 14.273 7.434 7.434a1 1 0 0 0 1.414-1.414l-17.999-18a1 1 0 1 0-1.414 1.414L5.39 6.804c-.643.429-1.254.927-1.821 1.495a12.382 12.382 0 0 0-1.39 1.683 1 1 0 0 0 1.644 1.14c.363-.524.761-1.01 1.16-1.41a9.94 9.94 0 0 1 1.855-1.46L7.99 9.405a8.14 8.14 0 0 0-3.203 3.377 1 1 0 0 0 1.784.903 6.08 6.08 0 0 1 1.133-1.563 6.116 6.116 0 0 1 1.77-1.234l1.407 1.407A5.208 5.208 0 0 0 8.336 13.7a5.25 5.25 0 0 0-1.09 1.612 1 1 0 0 0 1.832.802c.167-.381.394-.722.672-1a3.23 3.23 0 0 1 3.108-.841Zm-1.332-5.93 2.228 2.229a6.1 6.1 0 0 1 2.616 1.55c.444.444.837.995 1.137 1.582a1 1 0 1 0 1.78-.911 8.353 8.353 0 0 0-1.503-2.085 8.108 8.108 0 0 0-6.258-2.365ZM8.51 5.327l1.651 1.651a9.904 9.904 0 0 1 10.016 4.148 1 1 0 1 0 1.646-1.136A11.912 11.912 0 0 0 8.51 5.327Zm4.552 11.114a1.501 1.501 0 1 1-2.123 2.123 1.501 1.501 0 0 1 2.123-2.123Z",
|
"wifi-off-outline": "m12.858 14.273 7.434 7.434a1 1 0 0 0 1.414-1.414l-17.999-18a1 1 0 1 0-1.414 1.414L5.39 6.804c-.643.429-1.254.927-1.821 1.495a12.382 12.382 0 0 0-1.39 1.683 1 1 0 0 0 1.644 1.14c.363-.524.761-1.01 1.16-1.41a9.94 9.94 0 0 1 1.855-1.46L7.99 9.405a8.14 8.14 0 0 0-3.203 3.377 1 1 0 0 0 1.784.903 6.08 6.08 0 0 1 1.133-1.563 6.116 6.116 0 0 1 1.77-1.234l1.407 1.407A5.208 5.208 0 0 0 8.336 13.7a5.25 5.25 0 0 0-1.09 1.612 1 1 0 0 0 1.832.802c.167-.381.394-.722.672-1a3.23 3.23 0 0 1 3.108-.841Zm-1.332-5.93 2.228 2.229a6.1 6.1 0 0 1 2.616 1.55c.444.444.837.995 1.137 1.582a1 1 0 1 0 1.78-.911 8.353 8.353 0 0 0-1.503-2.085 8.108 8.108 0 0 0-6.258-2.365ZM8.51 5.327l1.651 1.651a9.904 9.904 0 0 1 10.016 4.148 1 1 0 1 0 1.646-1.136A11.912 11.912 0 0 0 8.51 5.327Zm4.552 11.114a1.501 1.501 0 1 1-2.123 2.123 1.501 1.501 0 0 1 2.123-2.123Z",
|
||||||
|
|
||||||
"brand-whatsapp-outline": "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",
|
|
||||||
"brand-twitter-outline": "M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z",
|
|
||||||
"brand-facebook-outline": "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",
|
"brand-facebook-outline": "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",
|
||||||
"brand-line-outline": "M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314",
|
"brand-line-outline": "M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314",
|
||||||
|
"brand-linkedin-outline": "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
|
||||||
"brand-sms-outline": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10a9.96 9.96 0 0 1-4.644-1.142l-4.29 1.117a.85.85 0 0 1-1.037-1.036l1.116-4.289A9.959 9.959 0 0 1 2 12C2 6.477 6.477 2 12 2Zm1.252 11H8.75l-.102.007a.75.75 0 0 0 0 1.486l.102.007h4.502l.101-.007a.75.75 0 0 0 0-1.486L13.252 13Zm1.998-3.5h-6.5l-.102.007a.75.75 0 0 0 0 1.486L8.75 11h6.5l.102-.007a.75.75 0 0 0 0-1.486L15.25 9.5Z",
|
"brand-sms-outline": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10a9.96 9.96 0 0 1-4.644-1.142l-4.29 1.117a.85.85 0 0 1-1.037-1.036l1.116-4.289A9.959 9.959 0 0 1 2 12C2 6.477 6.477 2 12 2Zm1.252 11H8.75l-.102.007a.75.75 0 0 0 0 1.486l.102.007h4.502l.101-.007a.75.75 0 0 0 0-1.486L13.252 13Zm1.998-3.5h-6.5l-.102.007a.75.75 0 0 0 0 1.486L8.75 11h6.5l.102-.007a.75.75 0 0 0 0-1.486L15.25 9.5Z",
|
||||||
"brand-telegram-outline": "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",
|
"brand-telegram-outline": "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",
|
||||||
"brand-linkedin-outline": "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
|
"brand-twitter-outline": "M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z",
|
||||||
|
"brand-whatsapp-outline": "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",
|
||||||
|
|
||||||
"add-solid": "M11.883 3.007 12 3a1 1 0 0 1 .993.883L13 4v7h7a1 1 0 0 1 .993.883L21 12a1 1 0 0 1-.883.993L20 13h-7v7a1 1 0 0 1-.883.993L12 21a1 1 0 0 1-.993-.883L11 20v-7H4a1 1 0 0 1-.993-.883L3 12a1 1 0 0 1 .883-.993L4 11h7V4a1 1 0 0 1 .883-.993L12 3l-.117.007Z",
|
"add-solid": "M11.883 3.007 12 3a1 1 0 0 1 .993.883L13 4v7h7a1 1 0 0 1 .993.883L21 12a1 1 0 0 1-.883.993L20 13h-7v7a1 1 0 0 1-.883.993L12 21a1 1 0 0 1-.993-.883L11 20v-7H4a1 1 0 0 1-.993-.883L3 12a1 1 0 0 1 .883-.993L4 11h7V4a1 1 0 0 1 .883-.993L12 3l-.117.007Z",
|
||||||
"subtract-solid": "M3.997 13H20a1 1 0 1 0 0-2H3.997a1 1 0 1 0 0 2Z",
|
"subtract-solid": "M3.997 13H20a1 1 0 1 0 0-2H3.997a1 1 0 1 0 0 2Z"
|
||||||
"subtract-outline": "M3.997 13H20a1 1 0 1 0 0-2H3.997a1 1 0 1 0 0 2Z",
|
|
||||||
"checkmark-circle-solid": "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm3.22 6.97-4.47 4.47-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5a.75.75 0 1 0-1.06-1.06Z",
|
|
||||||
"person-add-outline": "M17.5 12a5.5 5.5 0 1 1 0 11a5.5 5.5 0 0 1 0-11zm-5.477 2a6.47 6.47 0 0 0-.709 1.5H4.253a.749.749 0 0 0-.75.75v.577c0 .535.192 1.053.54 1.46c1.253 1.469 3.22 2.214 5.957 2.214c.597 0 1.157-.035 1.68-.106c.246.495.553.954.912 1.367c-.795.16-1.66.24-2.592.24c-3.146 0-5.532-.906-7.098-2.74a3.75 3.75 0 0 1-.898-2.435v-.578A2.249 2.249 0 0 1 4.253 14h7.77zm5.477 0l-.09.008a.5.5 0 0 0-.402.402L17 14.5V17h-2.496l-.09.008a.5.5 0 0 0-.402.402l-.008.09l.008.09a.5.5 0 0 0 .402.402l.09.008H17L17 20.5l.008.09a.5.5 0 0 0 .402.402l.09.008l.09-.008a.5.5 0 0 0 .402-.402L18 20.5V18h2.504l.09-.008a.5.5 0 0 0 .402-.402l.008-.09l-.008-.09a.5.5 0 0 0-.402-.402l-.09-.008H18L18 14.5l-.008-.09a.5.5 0 0 0-.402-.402L17.5 14zM10 2.005a5 5 0 1 1 0 10a5 5 0 0 1 0-10zm0 1.5a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7z",
|
|
||||||
"upload-outline": "M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552 6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713 4.25 4.25 0 0 0-8.489 0 .75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087ZM22 16.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Zm-6-1.793V19.5a.5.5 0 0 0 1 0v-4.793l1.646 1.647a.5.5 0 0 0 .708-.708l-2.5-2.5a.5.5 0 0 0-.708 0l-2.5 2.5a.5.5 0 0 0 .708.708L16 14.707Z"
|
|
||||||
}
|
}
|
||||||
|
|
24
app/jobs/conversations/user_mention_job.rb
Normal file
24
app/jobs/conversations/user_mention_job.rb
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
class Conversations::UserMentionJob < ApplicationJob
|
||||||
|
queue_as :default
|
||||||
|
|
||||||
|
def perform(mentioned_user_ids, conversation_id, account_id)
|
||||||
|
mentioned_user_ids.each do |mentioned_user_id|
|
||||||
|
mention = Mention.find_by(
|
||||||
|
user_id: mentioned_user_id,
|
||||||
|
conversation_id: conversation_id,
|
||||||
|
account_id: account_id
|
||||||
|
)
|
||||||
|
|
||||||
|
if mention.nil?
|
||||||
|
Mention.create(
|
||||||
|
user_id: mentioned_user_id,
|
||||||
|
conversation_id: conversation_id,
|
||||||
|
mentioned_at: Time.zone.now,
|
||||||
|
account_id: account_id
|
||||||
|
)
|
||||||
|
else
|
||||||
|
mention.update(mentioned_at: Time.zone.now)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -120,6 +120,13 @@ class ActionCableListener < BaseListener
|
||||||
broadcast(account, tokens, CONTACT_DELETED, contact.push_event_data)
|
broadcast(account, tokens, CONTACT_DELETED, contact.push_event_data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def conversation_mentioned(event)
|
||||||
|
conversation, account = extract_conversation_and_account(event)
|
||||||
|
user = event.data[:user]
|
||||||
|
|
||||||
|
broadcast(account, [user.pubsub_token], CONVERSATION_MENTIONED, conversation.push_event_data)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def typing_event_listener_tokens(account, conversation, user)
|
def typing_event_listener_tokens(account, conversation, user)
|
||||||
|
|
|
@ -62,7 +62,10 @@ class NotificationListener < BaseListener
|
||||||
|
|
||||||
return if mentioned_ids.blank?
|
return if mentioned_ids.blank?
|
||||||
|
|
||||||
get_valid_mentioned_ids(mentioned_ids, message.inbox).each do |user_id|
|
valid_mentioned_ids = get_valid_mentioned_ids(mentioned_ids, message.inbox)
|
||||||
|
Conversations::UserMentionJob.perform_later(valid_mentioned_ids, message.conversation.id, account.id)
|
||||||
|
|
||||||
|
valid_mentioned_ids.each do |user_id|
|
||||||
NotificationBuilder.new(
|
NotificationBuilder.new(
|
||||||
notification_type: 'conversation_mention',
|
notification_type: 'conversation_mention',
|
||||||
user: User.find(user_id),
|
user: User.find(user_id),
|
||||||
|
|
|
@ -35,37 +35,38 @@ class Account < ApplicationRecord
|
||||||
has_many :account_users, dependent: :destroy_async
|
has_many :account_users, dependent: :destroy_async
|
||||||
has_many :agent_bot_inboxes, dependent: :destroy_async
|
has_many :agent_bot_inboxes, dependent: :destroy_async
|
||||||
has_many :agent_bots, dependent: :destroy_async
|
has_many :agent_bots, dependent: :destroy_async
|
||||||
has_many :csat_survey_responses, dependent: :destroy_async
|
has_many :api_channels, dependent: :destroy_async, class_name: '::Channel::Api'
|
||||||
has_many :data_imports, dependent: :destroy_async
|
|
||||||
has_many :users, through: :account_users
|
|
||||||
has_many :inboxes, dependent: :destroy_async
|
|
||||||
has_many :notes, dependent: :destroy_async
|
|
||||||
has_many :campaigns, dependent: :destroy_async
|
has_many :campaigns, dependent: :destroy_async
|
||||||
has_many :conversations, dependent: :destroy_async
|
has_many :canned_responses, dependent: :destroy_async
|
||||||
has_many :messages, dependent: :destroy_async
|
|
||||||
has_many :contacts, dependent: :destroy_async
|
has_many :contacts, dependent: :destroy_async
|
||||||
|
has_many :conversations, dependent: :destroy_async
|
||||||
|
has_many :csat_survey_responses, dependent: :destroy_async
|
||||||
|
has_many :custom_attribute_definitions, dependent: :destroy_async
|
||||||
|
has_many :custom_filters, dependent: :destroy_async
|
||||||
|
has_many :data_imports, dependent: :destroy_async
|
||||||
|
has_many :email_channels, dependent: :destroy_async, class_name: '::Channel::Email'
|
||||||
has_many :facebook_pages, dependent: :destroy_async, class_name: '::Channel::FacebookPage'
|
has_many :facebook_pages, dependent: :destroy_async, class_name: '::Channel::FacebookPage'
|
||||||
|
has_many :hooks, dependent: :destroy_async, class_name: 'Integrations::Hook'
|
||||||
|
has_many :inboxes, dependent: :destroy_async
|
||||||
|
has_many :kbase_articles, dependent: :destroy_async, class_name: '::Kbase::Article'
|
||||||
|
has_many :kbase_categories, dependent: :destroy_async, class_name: '::Kbase::Category'
|
||||||
|
has_many :kbase_portals, dependent: :destroy_async, class_name: '::Kbase::Portal'
|
||||||
|
has_many :labels, dependent: :destroy_async
|
||||||
|
has_many :line_channels, dependent: :destroy_async, class_name: '::Channel::Line'
|
||||||
|
has_many :mentions, dependent: :destroy_async
|
||||||
|
has_many :messages, dependent: :destroy_async
|
||||||
|
has_many :notes, dependent: :destroy_async
|
||||||
|
has_many :notification_settings, dependent: :destroy_async
|
||||||
|
has_many :teams, dependent: :destroy_async
|
||||||
has_many :telegram_bots, dependent: :destroy_async
|
has_many :telegram_bots, dependent: :destroy_async
|
||||||
|
has_many :telegram_channels, dependent: :destroy_async, class_name: '::Channel::Telegram'
|
||||||
has_many :twilio_sms, dependent: :destroy_async, class_name: '::Channel::TwilioSms'
|
has_many :twilio_sms, dependent: :destroy_async, class_name: '::Channel::TwilioSms'
|
||||||
has_many :twitter_profiles, dependent: :destroy_async, class_name: '::Channel::TwitterProfile'
|
has_many :twitter_profiles, dependent: :destroy_async, class_name: '::Channel::TwitterProfile'
|
||||||
|
has_many :users, through: :account_users
|
||||||
has_many :web_widgets, dependent: :destroy_async, class_name: '::Channel::WebWidget'
|
has_many :web_widgets, dependent: :destroy_async, class_name: '::Channel::WebWidget'
|
||||||
has_many :email_channels, dependent: :destroy_async, class_name: '::Channel::Email'
|
|
||||||
has_many :api_channels, dependent: :destroy_async, class_name: '::Channel::Api'
|
|
||||||
has_many :line_channels, dependent: :destroy_async, class_name: '::Channel::Line'
|
|
||||||
has_many :telegram_channels, dependent: :destroy_async, class_name: '::Channel::Telegram'
|
|
||||||
has_many :whatsapp_channels, dependent: :destroy_async, class_name: '::Channel::Whatsapp'
|
|
||||||
has_many :canned_responses, dependent: :destroy_async
|
|
||||||
has_many :webhooks, dependent: :destroy_async
|
has_many :webhooks, dependent: :destroy_async
|
||||||
has_many :labels, dependent: :destroy_async
|
has_many :whatsapp_channels, dependent: :destroy_async, class_name: '::Channel::Whatsapp'
|
||||||
has_many :notification_settings, dependent: :destroy_async
|
|
||||||
has_many :hooks, dependent: :destroy_async, class_name: 'Integrations::Hook'
|
|
||||||
has_many :working_hours, dependent: :destroy_async
|
has_many :working_hours, dependent: :destroy_async
|
||||||
has_many :kbase_portals, dependent: :destroy_async, class_name: '::Kbase::Portal'
|
|
||||||
has_many :kbase_categories, dependent: :destroy_async, class_name: '::Kbase::Category'
|
|
||||||
has_many :kbase_articles, dependent: :destroy_async, class_name: '::Kbase::Article'
|
|
||||||
has_many :teams, dependent: :destroy_async
|
|
||||||
has_many :custom_filters, dependent: :destroy_async
|
|
||||||
has_many :custom_attribute_definitions, dependent: :destroy_async
|
|
||||||
|
|
||||||
has_flags ACCOUNT_SETTINGS_FLAGS.merge(column: 'settings_flags').merge(DEFAULT_QUERY_SETTING)
|
has_flags ACCOUNT_SETTINGS_FLAGS.merge(column: 'settings_flags').merge(DEFAULT_QUERY_SETTING)
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ class Conversation < ApplicationRecord
|
||||||
belongs_to :team, optional: true
|
belongs_to :team, optional: true
|
||||||
belongs_to :campaign, optional: true
|
belongs_to :campaign, optional: true
|
||||||
|
|
||||||
|
has_many :mentions, dependent: :destroy_async
|
||||||
has_many :messages, dependent: :destroy_async, autosave: true
|
has_many :messages, dependent: :destroy_async, autosave: true
|
||||||
has_one :csat_survey_response, dependent: :destroy_async
|
has_one :csat_survey_response, dependent: :destroy_async
|
||||||
has_many :notifications, as: :primary_actor, dependent: :destroy
|
has_many :notifications, as: :primary_actor, dependent: :destroy
|
||||||
|
|
50
app/models/mention.rb
Normal file
50
app/models/mention.rb
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: mentions
|
||||||
|
#
|
||||||
|
# id :bigint not null, primary key
|
||||||
|
# mentioned_at :datetime not null
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# account_id :bigint not null
|
||||||
|
# conversation_id :bigint not null
|
||||||
|
# user_id :bigint not null
|
||||||
|
#
|
||||||
|
# Indexes
|
||||||
|
#
|
||||||
|
# index_mentions_on_account_id (account_id)
|
||||||
|
# index_mentions_on_conversation_id (conversation_id)
|
||||||
|
# index_mentions_on_user_id (user_id)
|
||||||
|
# index_mentions_on_user_id_and_conversation_id (user_id,conversation_id) UNIQUE
|
||||||
|
#
|
||||||
|
# Foreign Keys
|
||||||
|
#
|
||||||
|
# fk_rails_... (conversation_id => conversations.id)
|
||||||
|
# fk_rails_... (user_id => users.id)
|
||||||
|
#
|
||||||
|
class Mention < ApplicationRecord
|
||||||
|
before_validation :ensure_account_id
|
||||||
|
validates :mentioned_at, presence: true
|
||||||
|
validates :account_id, presence: true
|
||||||
|
validates :conversation_id, presence: true
|
||||||
|
validates :user_id, presence: true
|
||||||
|
validates :user, uniqueness: { scope: :conversation }
|
||||||
|
|
||||||
|
belongs_to :account
|
||||||
|
belongs_to :conversation
|
||||||
|
belongs_to :user
|
||||||
|
|
||||||
|
after_commit :notify_mentioned_user
|
||||||
|
|
||||||
|
scope :latest, -> { order(mentioned_at: :desc) }
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def ensure_account_id
|
||||||
|
self.account_id = conversation&.account_id
|
||||||
|
end
|
||||||
|
|
||||||
|
def notify_mentioned_user
|
||||||
|
Rails.configuration.dispatcher.dispatch(CONVERSATION_MENTIONED, Time.zone.now, user: user, conversation: conversation)
|
||||||
|
end
|
||||||
|
end
|
|
@ -80,13 +80,14 @@ class User < ApplicationRecord
|
||||||
has_many :messages, as: :sender
|
has_many :messages, as: :sender
|
||||||
has_many :invitees, through: :account_users, class_name: 'User', foreign_key: 'inviter_id', source: :inviter, dependent: :nullify
|
has_many :invitees, through: :account_users, class_name: 'User', foreign_key: 'inviter_id', source: :inviter, dependent: :nullify
|
||||||
|
|
||||||
has_many :notifications, dependent: :destroy_async
|
has_many :custom_filters, dependent: :destroy_async
|
||||||
|
has_many :mentions, dependent: :destroy_async
|
||||||
|
has_many :notes, dependent: :nullify
|
||||||
has_many :notification_settings, dependent: :destroy_async
|
has_many :notification_settings, dependent: :destroy_async
|
||||||
has_many :notification_subscriptions, dependent: :destroy_async
|
has_many :notification_subscriptions, dependent: :destroy_async
|
||||||
|
has_many :notifications, dependent: :destroy_async
|
||||||
has_many :team_members, dependent: :destroy_async
|
has_many :team_members, dependent: :destroy_async
|
||||||
has_many :teams, through: :team_members
|
has_many :teams, through: :team_members
|
||||||
has_many :notes, dependent: :nullify
|
|
||||||
has_many :custom_filters, dependent: :destroy_async
|
|
||||||
|
|
||||||
before_validation :set_password_and_uid, on: :create
|
before_validation :set_password_and_uid, on: :create
|
||||||
|
|
||||||
|
|
13
db/migrate/20211201224513_create_mentions.rb
Normal file
13
db/migrate/20211201224513_create_mentions.rb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
class CreateMentions < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
create_table :mentions do |t|
|
||||||
|
t.references :user, null: false, foreign_key: true
|
||||||
|
t.references :conversation, null: false, foreign_key: true
|
||||||
|
t.references :account, index: true, null: false
|
||||||
|
t.datetime :mentioned_at, null: false
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index :mentions, [:user_id, :conversation_id], unique: true
|
||||||
|
end
|
||||||
|
end
|
15
db/schema.rb
15
db/schema.rb
|
@ -531,6 +531,19 @@ ActiveRecord::Schema.define(version: 2021_12_08_085931) do
|
||||||
t.index ["title", "account_id"], name: "index_labels_on_title_and_account_id", unique: true
|
t.index ["title", "account_id"], name: "index_labels_on_title_and_account_id", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "mentions", force: :cascade do |t|
|
||||||
|
t.bigint "user_id", null: false
|
||||||
|
t.bigint "conversation_id", null: false
|
||||||
|
t.bigint "account_id", null: false
|
||||||
|
t.datetime "mentioned_at", null: false
|
||||||
|
t.datetime "created_at", precision: 6, null: false
|
||||||
|
t.datetime "updated_at", precision: 6, null: false
|
||||||
|
t.index ["account_id"], name: "index_mentions_on_account_id"
|
||||||
|
t.index ["conversation_id"], name: "index_mentions_on_conversation_id"
|
||||||
|
t.index ["user_id", "conversation_id"], name: "index_mentions_on_user_id_and_conversation_id", unique: true
|
||||||
|
t.index ["user_id"], name: "index_mentions_on_user_id"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "messages", id: :serial, force: :cascade do |t|
|
create_table "messages", id: :serial, force: :cascade do |t|
|
||||||
t.text "content"
|
t.text "content"
|
||||||
t.integer "account_id", null: false
|
t.integer "account_id", null: false
|
||||||
|
@ -764,6 +777,8 @@ ActiveRecord::Schema.define(version: 2021_12_08_085931) do
|
||||||
add_foreign_key "csat_survey_responses", "messages"
|
add_foreign_key "csat_survey_responses", "messages"
|
||||||
add_foreign_key "csat_survey_responses", "users", column: "assigned_agent_id"
|
add_foreign_key "csat_survey_responses", "users", column: "assigned_agent_id"
|
||||||
add_foreign_key "data_imports", "accounts"
|
add_foreign_key "data_imports", "accounts"
|
||||||
|
add_foreign_key "mentions", "conversations"
|
||||||
|
add_foreign_key "mentions", "users"
|
||||||
add_foreign_key "notes", "accounts"
|
add_foreign_key "notes", "accounts"
|
||||||
add_foreign_key "notes", "contacts"
|
add_foreign_key "notes", "contacts"
|
||||||
add_foreign_key "notes", "users"
|
add_foreign_key "notes", "users"
|
||||||
|
|
|
@ -25,6 +25,7 @@ module Events::Types
|
||||||
TEAM_CHANGED = 'team.changed'
|
TEAM_CHANGED = 'team.changed'
|
||||||
CONVERSATION_TYPING_ON = 'conversation.typing_on'
|
CONVERSATION_TYPING_ON = 'conversation.typing_on'
|
||||||
CONVERSATION_TYPING_OFF = 'conversation.typing_off'
|
CONVERSATION_TYPING_OFF = 'conversation.typing_off'
|
||||||
|
CONVERSATION_MENTIONED = 'conversation.mentioned'
|
||||||
|
|
||||||
# message events
|
# message events
|
||||||
MESSAGE_CREATED = 'message.created'
|
MESSAGE_CREATED = 'message.created'
|
||||||
|
|
Loading…
Reference in a new issue