Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
d4a052a
[WIP] Add thread creation to home screen
mrsimpson Jul 20, 2018
97f8c6f
Made it look nice, fix a lot of essentials, added even more TODOs
mrsimpson Jul 23, 2018
510efee
enable debugging for non-rocketchat-packages
mrsimpson Jul 23, 2018
5963fdb
Propagate user creating the thread properly
mrsimpson Jul 23, 2018
2bd5eff
Ask questions with thread
vickyokrm Jul 31, 2018
9994302
world cloud integration fix
vickyokrm Aug 7, 2018
e1f27ca
fix circleci out of memory
vickyokrm Aug 8, 2018
85a3279
fix circleci
vickyokrm Aug 8, 2018
5949142
update npm
vickyokrm Aug 8, 2018
8770ce3
Add translations
mrsimpson Aug 10, 2018
34248e7
Role-Check needs roomas context
mrsimpson Aug 10, 2018
fbfa4e5
Adapt thread-created message to display the quoted message
mrsimpson Aug 10, 2018
4a0c5e9
Fix channel attachments not being navigateable as mentions
mrsimpson Aug 10, 2018
1324c37
Add threading from context menu
mrsimpson Aug 10, 2018
66e3f8e
Add icon for threading
mrsimpson Aug 10, 2018
adf1254
Support renamed rooms in thread message
mrsimpson Aug 10, 2018
ee22f80
Support usage of channel-ID in mentions
mrsimpson Aug 10, 2018
eac4147
Move threading setting to separate group to allow stable automated tests
mrsimpson Aug 10, 2018
ed10759
Adapt circle-ci configuration for Assistify
mrsimpson Aug 13, 2018
8e1fbbf
Verticall align thread creation on home screen
mrsimpson Aug 13, 2018
41ee70b
Fix book-icon for wordcloud
mrsimpson Aug 13, 2018
ab5b300
Provide back button from wordcloud
mrsimpson Aug 14, 2018
731f33e
show all channels in thread settings
vickyokrm Aug 14, 2018
a335908
Merge branch '#418-requestless-threading' of https://github.com/assis…
vickyokrm Aug 14, 2018
a53bfba
Don't show wordcloud for the time being
mrsimpson Aug 14, 2018
a602124
Merge branch '#418-requestless-threading' of https://github.com/assis…
mrsimpson Aug 14, 2018
bb64b24
update circleci config to our tagnames
mrsimpson Aug 14, 2018
11c4005
Fix autocomplete for parent channel
vickyokrm Aug 14, 2018
c5f194b
Merge branch '#418-requestless-threading' of https://github.com/assis…
mrsimpson Aug 14, 2018
5da86c1
Add threads to sidepanel
mrsimpson Aug 14, 2018
dc6bcdc
Explicit route for create-thread
mrsimpson Aug 14, 2018
8e2e8f6
Fix configuration andselect proper default channel
mrsimpson Aug 14, 2018
65bb748
minor UI fixes
mrsimpson Aug 15, 2018
06a1b19
Add parentRoom index to rooms and subscriptions
mrsimpson Aug 15, 2018
89c781e
create threads in direct messages as private groups
mrsimpson Aug 15, 2018
137e10a
Create thread from direct message with better name
mrsimpson Aug 15, 2018
ad7f2cd
Improve UX
mrsimpson Aug 15, 2018
4f818ba
Fix scrolling and make sidebar-button larger
mrsimpson Aug 15, 2018
5e5edeb
Unimplement threading on home fix overlapping modals
mrsimpson Aug 15, 2018
a495f84
Minor beautifications on code level
mrsimpson Aug 16, 2018
18c86fe
Fix: Allow normal users to select only public channels for threads
mrsimpson Aug 16, 2018
ce34629
Move threading button to the top
mrsimpson Aug 16, 2018
792fcf0
Hide private channels from inital dropdown
mrsimpson Aug 16, 2018
5761d67
Improve creation screenUX
mrsimpson Aug 16, 2018
7438c44
Don't offer threads as potential parents
mrsimpson Aug 16, 2018
0da19c3
Configure action menu for threading
mrsimpson Aug 16, 2018
6aa72ce
remove no-rooms-message from threading list
mrsimpson Aug 16, 2018
17aa919
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson Aug 16, 2018
c6f81d1
Remove "no threads" text from sidebar
mrsimpson Aug 16, 2018
f82c0ed
Remove "no threads" text from sidebar
mrsimpson Aug 16, 2018
d07d256
Fix test failing due to new user preference
mrsimpson Aug 17, 2018
25e5a9a
Add scripts for executing tests seperately
mrsimpson Aug 17, 2018
4c07c51
Exclude test-documentation screenshots from git
mrsimpson Aug 17, 2018
e9c082c
Add tests for threading
mrsimpson Aug 17, 2018
5a8d5e9
Add thread creation from message action
mrsimpson Aug 17, 2018
812f9c0
Cleaup tests for threading
mrsimpson Aug 17, 2018
0a8858d
Merge remote-tracking branch 'origin/#418-requestless-threading' into…
mrsimpson Aug 17, 2018
7b2a85e
Add migrations for requests and topics
mrsimpson Aug 20, 2018
05b4d08
Skip setup-wizard tests if they completed earlier on
vickyokrm Aug 20, 2018
6f12af8
Revert try of skipping the setup wizard
mrsimpson Aug 20, 2018
62c5daf
Grant more time for autocomplete to vanish
mrsimpson Aug 20, 2018
35203c9
Provide the threaded message as message quote preserving ordering
mrsimpson Aug 28, 2018
0510e38
Fix wordcloud being visible in dropdiwn
mrsimpson Aug 28, 2018
8d5f038
Fix migration: update subscriptions too
mrsimpson Aug 28, 2018
9928698
choose general as default channel
mrsimpson Aug 28, 2018
9d46d13
update ui texts
mrsimpson Aug 28, 2018
6055aca
Set focus on thread creation
mrsimpson Aug 28, 2018
d96df06
Move threads list in sidenav beneath the favorites and unred
mrsimpson Aug 28, 2018
39ec65f
Merge pull request #434 from assistify/#418-requestless-threading
mrsimpson Aug 28, 2018
39551ae
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson Aug 28, 2018
74a2666
Cleanup unnecessarily changed artefacts
mrsimpson Aug 28, 2018
afdfcd8
Satisfy the even stricter linter
mrsimpson Aug 28, 2018
1dc8917
Satisfy stylelint
mrsimpson Aug 29, 2018
c2c1b87
Adapt threading test for CircleCi's low performance
mrsimpson Aug 29, 2018
b53a82e
Merge branch 'develop' into core/threading
Dec 14, 2018
5678971
Import global variables that has been removed from eslintrc
Dec 14, 2018
5344861
Fixes as already implemented and tested on downstream fork
mrsimpson Dec 17, 2018
ea956fc
Validate permission for thread creation for showing the button
mrsimpson Dec 17, 2018
e732f95
Merge branch 'develop' into core/threading
engelgabriel Dec 17, 2018
f608568
Merge branch 'core/threading' of https://github.com/assistify/Rocket.…
mrsimpson Dec 18, 2018
d1486ef
Resolve merge conflicts and add auth for button
mrsimpson Dec 18, 2018
36f491b
Navigatable back button in thread header
mrsimpson Dec 18, 2018
af7efbf
Merge branch 'develop' into core/threading
mrsimpson Dec 18, 2018
a59e49b
Import Toastr
mrsimpson Dec 18, 2018
efcad4b
Infrastructure for custom renderings of attachment fields
mrsimpson Dec 18, 2018
a26fa39
Replace global openRoom with Router-function
mrsimpson Dec 18, 2018
795fda4
Minimal identification checks in methods
mrsimpson Dec 19, 2018
548f77a
Add replies and last-message-age to thread created
mrsimpson Dec 19, 2018
e7586b7
add package.js
mrsimpson Dec 20, 2018
b106f93
Merge branch 'develop' into pr/11803-mrsimpson-core/threading
sampaiodiego Jan 3, 2019
637accc
Fix file names
sampaiodiego Jan 3, 2019
b490778
Don't suppress system messages in threads
mrsimpson Jan 5, 2019
cfcc113
Slash command /thread
mrsimpson Jan 5, 2019
64d179e
Merge branch 'core/threading' of https://github.com/assistify/Rocket.…
mrsimpson Jan 5, 2019
fef61d6
Make thread metadata on message update on new thread message
mrsimpson Jan 6, 2019
0a6272a
Add slash command and fix linting
mrsimpson Jan 6, 2019
a00e826
Add threads tabbar
mrsimpson Jan 6, 2019
701ad20
Threads: Display last change on instead of age
mrsimpson Jan 6, 2019
e9f1fae
Fix filenames
mrsimpson Jan 6, 2019
f0f0242
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson Jan 7, 2019
5390eb8
Merge remote-tracking branch 'upstream/develop' into core/threading
mrsimpson Feb 1, 2019
89a1db8
Add missing imports
mrsimpson Feb 1, 2019
2ed0843
Merge branch 'develop' into core/threading
engelgabriel Feb 4, 2019
2d0ed55
Merge branch 'develop' into core/threading
mrsimpson Feb 6, 2019
37334ba
Merge branch 'core/threading' of git@github.com:assistify/Rocket.Chat…
ggazzo Feb 8, 2019
46f65b4
removed sidenav button
ggazzo Feb 13, 2019
6da53aa
removed slashcommands
ggazzo Feb 13, 2019
0fe376f
create thread message action function improved
ggazzo Feb 13, 2019
c2f7fbb
thread from message box method refactor
ggazzo Feb 13, 2019
f8f4c96
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into threads
ggazzo Feb 14, 2019
74392fa
moved create thread and channel to popup
ggazzo Feb 19, 2019
c953ad6
delete room, deletes all chain
ggazzo Feb 19, 2019
9443868
added addRoomAccessValidator to allow user to join private subthreads
ggazzo Feb 19, 2019
bd6c565
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into pr/1…
ggazzo Feb 20, 2019
0466e1b
Merge branch 'pr/11803-mrsimpson-core/threading' into threads
ggazzo Feb 20, 2019
fa889d4
fix imports
ggazzo Feb 20, 2019
f9e1fe7
fix imports
ggazzo Feb 20, 2019
f8caa84
fix imports
ggazzo Feb 20, 2019
510c039
fix imports
ggazzo Feb 20, 2019
ab8c169
Merge branch 'core/threading' of github.com:assistify/Rocket.Chat int…
ggazzo Feb 20, 2019
2332f0e
deleting message will delete the thread
ggazzo Feb 20, 2019
5c964e2
fix back icon
ggazzo Feb 20, 2019
0369f89
fixed logic to prune thread message
ggazzo Feb 21, 2019
af87678
Merge branch 'develop' into threads
ggazzo Feb 21, 2019
8a7fa76
send message system on thread created
ggazzo Feb 22, 2019
e1e7507
Merge branch 'threads' of github.com:RocketChat/Rocket.Chat into threads
ggazzo Feb 22, 2019
5addfc4
fix typo and changed _id for username
ggazzo Feb 25, 2019
23942a8
Merge branch 'develop' into threads
ggazzo Feb 25, 2019
9eeee74
Merge remote-tracking branch 'origin/develop' into threads
ggazzo Feb 25, 2019
fe9f809
Fix threading i18n (#13578)
mrsimpson Mar 6, 2019
074a712
Merge branch 'develop' into threads
sampaiodiego Mar 6, 2019
22002de
Allow sending message before joining a thread
sampaiodiego Mar 7, 2019
773ed6f
Allow any character on thread name
sampaiodiego Mar 7, 2019
1e54d65
Fix 404 error when trying to see a not joined thread
sampaiodiego Mar 7, 2019
46b5231
Change thread icon
sampaiodiego Mar 7, 2019
dce3144
auto invite user, freeze thread settings
ggazzo Mar 7, 2019
d656657
Merge branch 'threads' of github.com:RocketChat/Rocket.Chat into threads
sampaiodiego Mar 7, 2019
7773fa6
Create threads as private groups
sampaiodiego Mar 7, 2019
d005119
Prevent nested threads
sampaiodiego Mar 7, 2019
2c68516
fix search room
ggazzo Mar 7, 2019
09ae45c
name suggestion
ggazzo Mar 7, 2019
8b57358
changed text field name
ggazzo Mar 7, 2019
782b007
Fix getRoomById too-many-calls by adding a memoize
sampaiodiego Mar 7, 2019
33a3a6f
threads sidebar
ggazzo Mar 7, 2019
16e90e2
Create a new message to notify about a thread
sampaiodiego Mar 7, 2019
4045d3d
Merge branch 'threads' of github.com:RocketChat/Rocket.Chat into threads
sampaiodiego Mar 7, 2019
98d40c0
removed useless code
ggazzo Mar 7, 2019
a4ce2d0
Merge branch 'develop' into threads
ggazzo Mar 7, 2019
f933e59
useless configs
ggazzo Mar 7, 2019
3885401
Merge branch 'threads' of github.com:RocketChat/Rocket.Chat into threads
ggazzo Mar 7, 2019
30900b7
Merge branch 'threads' of github.com:RocketChat/Rocket.Chat into threads
sampaiodiego Mar 8, 2019
881980e
Fix tests
sampaiodiego Mar 8, 2019
108c13b
Move package to mainModule
sampaiodiego Mar 8, 2019
359b12e
Respect setting to show threads on sidebar
sampaiodiego Mar 8, 2019
574b96f
Remove slash command files
sampaiodiego Mar 8, 2019
d2be600
Add condition to show threads category
sampaiodiego Mar 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ settings.json
build.sh
/public/livechat
packages/rocketchat-i18n/i18n/livechat.*
tests/end-to-end/temporary_staged_test
.screenshots
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ rocketchat:search
chatpal:search
rocketchat:lazy-load
tap:i18n
assistify:threading
underscore@1.0.10
rocketchat:bigbluebutton
rocketchat:mailmessages
Expand Down
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ accounts-password@1.5.1
accounts-twitter@1.4.2
aldeed:simple-schema@1.5.4
allow-deny@1.1.0
assistify:threading@0.1.0
autoupdate@1.5.0
babel-compiler@7.2.4
babel-runtime@1.3.0
Expand Down
6 changes: 6 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "0.2.0",
"configurations": [

{
"name": "Attach to meteor debug",
"type": "node",
Expand All @@ -13,6 +14,7 @@
"meteor://💻app/*": "${workspaceFolder}/*",
"meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*",
"meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*",
"meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*"
},
"protocol": "inspector"
},
Expand All @@ -26,6 +28,7 @@
"meteor://💻app/*": "${workspaceFolder}/*",
"meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*",
"meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*",
"meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*"
}
},
{
Expand All @@ -43,6 +46,7 @@
"meteor://💻app/*": "${workspaceFolder}/*",
"meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*",
"meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*",
"meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*"
},
"protocol": "inspector"
},
Expand All @@ -61,6 +65,7 @@
"meteor://💻app/*": "${workspaceFolder}/*",
"meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*",
"meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*",
"meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*"
},
"protocol": "inspector"
},
Expand All @@ -79,6 +84,7 @@
"meteor://💻app/*": "${workspaceFolder}/*",
"meteor://💻app/packages/rocketchat:*": "${workspaceFolder}/packages/rocketchat-*",
"meteor://💻app/packages/chatpal:*": "${workspaceFolder}/packages/chatpal-*",
"meteor://💻app/packages/assistify:*": "${workspaceFolder}/packages/assistify-*"
},
"env": {
"TEST_MODE": "true"
Expand Down
6 changes: 5 additions & 1 deletion client/routes/roomRoute.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import mem from 'mem';

import { FlowRouter } from 'meteor/kadira:flow-router';
import { ChatSubscription } from 'meteor/rocketchat:models';
import { roomTypes } from 'meteor/rocketchat:utils';
import { call } from 'meteor/rocketchat:ui-utils';

const getRoomById = mem((rid) => call('getRoomById', rid));

FlowRouter.goToRoomById = async(rid) => {
if (!rid) {
return;
Expand All @@ -12,6 +16,6 @@ FlowRouter.goToRoomById = async(rid) => {
return roomTypes.openRouteLink(subscription.t, subscription, FlowRouter.current().queryParams);
}

const room = await call('getRoomById', rid);
const room = await getRoomById(rid);
return roomTypes.openRouteLink(room.t, room, FlowRouter.current().queryParams);
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"jslint": "eslint .",
"stylelint": "stylelint \"packages/**/*.css\"",
"test": "node .scripts/start.js",
"deploy": "npm run build && pm2 startOrRestart pm2.json",
"chimp-path": "chimp tests/chimp-config.js --path=$CHIMP_PATH",
"chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests/end-to-end",
"chimp-test": "chimp tests/chimp-config.js",
"postinstall": "cd packages/rocketchat-katex && npm i",
Expand Down
49 changes: 49 additions & 0 deletions packages/assistify-threading/client/createThreadMessageAction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { Subscriptions } from 'meteor/rocketchat:models';
import { settings } from 'meteor/rocketchat:settings';
import { hasPermission } from 'meteor/rocketchat:authorization';
import { MessageAction, modal } from 'meteor/rocketchat:ui-utils';


const condition = (rid, uid) => {
if (!Subscriptions.findOne({ rid })) {
return false;
}
return uid !== Meteor.userId() ? hasPermission('start-thread-other-user') : hasPermission('start-thread');
};

Meteor.startup(function() {
Tracker.autorun(() => {
if (settings.get('Thread_from_context_menu') !== 'button') {
return MessageAction.removeButton('start-thread');
}

MessageAction.addButton({
id: 'start-thread',
icon: 'thread',
label: 'Thread_start',
context: ['message', 'message-mobile'],
async action() {
const [, message] = this._arguments;

modal.open({
content: 'CreateThread',
data: { rid: message.rid, message, onCreate() {
modal.close();
} },
showConfirmButton: false,
showCancelButton: false,
});
},
condition({ rid, u: { _id: uid }, attachments }) {
if (attachments && attachments[0] && attachments[0].fields && attachments[0].fields[0].type === 'messageCounter') {
return false;
}
return condition(rid, uid);
},
order: 0,
group: 'menu',
});
});
});
20 changes: 20 additions & 0 deletions packages/assistify-threading/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Templates
import './views/creationDialog/CreateThread.html';
import './views/creationDialog/CreateThread';
import './views/ThreadList.html';
import './views/ThreadList';
import './views/ThreadsTabbar.html';
import './views/ThreadsTabbar';
import './views/fieldTypeThreadReplyCounter.html';
import './views/fieldTypeThreadReplyCounter';
import './views/fieldTypeThreadLastMessageAge.html';
import './views/fieldTypeThreadLastMessageAge';

// Other UI extensions
import './lib/messageTypes/threadMessage';
import './lib/threadsOfRoom';
import './createThreadMessageAction';
import './threadFromMessageBox';
import './tabBar';

import '../lib/threadRoomType';
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Meteor } from 'meteor/meteor';
import { TAPi18n } from 'meteor/tap:i18n';
import { MessageTypes } from 'meteor/rocketchat:ui-utils';

Meteor.startup(function() {
MessageTypes.registerType({
id: 'thread-created',
system: true,
message: 'thread-created',
data(message) {
return {
// channelLink: `<a class="mention-link" data-channel= ${ message.channels[0]._id } title="">${ TAPi18n.__('thread') }</a>`,
message: message.msg,
username: `<a class="mention-link" data-username=${ message.u.username } title="">@${ message.u.username }</a>`,
};
},
});

MessageTypes.registerType({
id: 'thread-welcome',
system: true,
message: 'thread-welcome',
data(message) {
const threadChannelName = TAPi18n.__('a_direct_message');

return {
parentChannel: `<a class="mention-link" data-channel= ${ threadChannelName } title="">${ threadChannelName }</a>`,
username: `<a class="mention-link" data-username= ${ message.mentions[0].name } title="">@${ message.mentions[0].name }</a>`,
};
},
});
});
3 changes: 3 additions & 0 deletions packages/assistify-threading/client/lib/threadsOfRoom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Mongo } from 'meteor/mongo';

export const ThreadsOfRoom = new Mongo.Collection('rocketchat_threads_of_room');
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.attachment-fields button {
min-height: auto;
padding: 3px;

font-weight: normal;
}

.attachment-fields button:hover {
text-decoration: none;
}

.attachment-fields button.no-replies {
opacity: 0.4;
}

.threads-list .empty {
margin-top: 60px;

text-align: center;

color: #7f7f7f;
}

.threads-list .load-more {
text-align: center;
text-transform: lowercase;

font-style: italic;
line-height: 40px;
}

.threads-list .load-more .load-more-loading {
color: #aaaaaa;
}
13 changes: 13 additions & 0 deletions packages/assistify-threading/client/tabBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Meteor } from 'meteor/meteor';
import { TabBar } from 'meteor/rocketchat:ui-utils';

Meteor.startup(function() {
return TabBar.addButton({
groups: ['channel', 'group', 'direct'],
id: 'threads',
i18nTitle: 'Threads',
icon: 'thread',
template: 'threadsTabbar',
order: 10,
});
});
33 changes: 33 additions & 0 deletions packages/assistify-threading/client/threadFromMessageBox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { messageBox, modal } from 'meteor/rocketchat:ui-utils';
import { settings } from 'meteor/rocketchat:settings';

Meteor.startup(function() {
Tracker.autorun(() => {
if (settings.get('Thread_from_context_menu') !== 'button') {
return messageBox.actions.remove('Create_new', /start-thread/);
}
messageBox.actions.add('Create_new', 'Thread', {
id: 'start-thread',
icon: 'thread',
condition: () => true,
action(data) {
modal.open({
// title: t('Message_info'),
content: 'CreateThread',
data: {
...data,
onCreate() {
modal.close();
},
},
showConfirmButton: false,
showCancelButton: false,
// confirmButtonText: t('Close'),
});
},
});

});
});
10 changes: 10 additions & 0 deletions packages/assistify-threading/client/views/ThreadList.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<template name="ThreadList">
{{#if rooms}}
<h3 class="rooms-list__type">
{{_ "Threads"}}
</h3>
<ul class="rooms-list__list">
{{#each room in rooms}} {{> chatRoomItem room }} {{/each}}
</ul>
{{/if}}
</template>
25 changes: 25 additions & 0 deletions packages/assistify-threading/client/views/ThreadList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ChatSubscription } from 'meteor/rocketchat:models';
import { getUserPreference } from 'meteor/rocketchat:utils';
import { settings } from 'meteor/rocketchat:settings';
Template.ThreadList.helpers({
rooms() {
const user = Meteor.userId();
const sortBy = getUserPreference(user, 'sidebarSortby') || 'alphabetical';
const query = {
open: true,
};

const sort = {};

if (sortBy === 'activity') {
sort.lm = -1;
} else { // alphabetical
sort[this.identifier === 'd' && settings.get('UI_Use_Real_Name') ? 'lowerCaseFName' : 'lowerCaseName'] = /descending/.test(sortBy) ? -1 : 1;
}

query.prid = { $exists: true };
return ChatSubscription.find(query, { sort });
},
});
22 changes: 22 additions & 0 deletions packages/assistify-threading/client/views/ThreadsTabbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template name="threadsTabbar">
{{#if Template.subscriptionsReady}}
{{#unless hasMessages}}
<div class="list-view threads-list flex-tab__header">
<h2>{{_ "No_threads_yet"}}</h2>
</div>
{{/unless}}
{{/if}}
<div class="flex-tab__result threads-list js-list">
<ul class="list clearfix">
{{#each messages}}
{{#nrr nrrargs 'message' message}}{{/nrr}}
{{/each}}
</ul>

{{#if hasMore}}
<div class="load-more">
{{> loading}}
</div>
{{/if}}
</div>
</template>
Loading