Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
8fecfaf
VerticalBar
ggazzo Apr 16, 2020
9448697
Changed rooms routes to allow tabs parameters
ggazzo Apr 22, 2020
b4c2223
Do not read thread before open the thread
ggazzo Apr 22, 2020
3d827fe
VerticalBar Updated
ggazzo Apr 22, 2020
7566511
ignore threads from main thread
ggazzo Apr 22, 2020
15149a5
Updated code to open thread as a popout instead of contextual bar
ggazzo Apr 22, 2020
a708d45
Filter markdown for headers
ggazzo Apr 24, 2020
ba688b8
[WIP] Also send in channel feature
ggazzo Apr 24, 2020
70b809b
Loading placeholder
ggazzo Apr 24, 2020
1fb7620
Fix concurrency problem while fetching integration data
ggazzo Apr 24, 2020
71eb1ce
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Apr 24, 2020
f6c509b
Fix import
ggazzo Apr 24, 2020
31471cc
Also send in channel feature
ggazzo Apr 27, 2020
345a75f
Read receipt on thread message
ggazzo Apr 27, 2020
0215732
Jump to thread and load old thread
ggazzo Apr 27, 2020
829ad8e
Send to bottom thread
ggazzo Apr 27, 2020
2895a47
Main thread style
ggazzo Apr 27, 2020
7142032
Scroll to bottom after send message
ggazzo Apr 27, 2020
99c95c3
Jump to thread
ggazzo Apr 27, 2020
514b28a
Fix Stylelint
ggazzo Apr 27, 2020
68120e0
Unread message badge
ggazzo Apr 27, 2020
45269e1
ReadThread Method
ggazzo Apr 27, 2020
4f3c766
Improve find parent message function
ggazzo Apr 27, 2020
432fc7d
Remove console.log
ggazzo Apr 28, 2020
7ebc200
Merge branch 'develop' into feat/new-threads
ggazzo Apr 28, 2020
04e0635
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo Apr 30, 2020
63ca17b
Merge branch 'develop' into feat/new-threads
ggazzo May 2, 2020
2239be4
Merge branch 'develop' into feat/new-threads
ggazzo May 4, 2020
4fcd8e9
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo May 5, 2020
f5ffeca
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 6, 2020
d814763
Merge branch 'develop' into feat/new-threads
ggazzo May 6, 2020
8ac2b5c
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo May 6, 2020
fec3d04
Fix width thread placeholder
ggazzo May 7, 2020
b4a8a8b
Clear Checkbox Send to Channel after send message
ggazzo May 7, 2020
e389c20
Close thread on press esc and empty message
ggazzo May 7, 2020
8f1fca5
Fix ts on thread's main message
sampaiodiego May 7, 2020
86ebd23
Jump to thread click on notification
ggazzo May 7, 2020
151a8fe
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 7, 2020
fb92557
Always reply in thread
ggazzo May 7, 2020
9e0e8aa
Merge branch 'develop' into feat/new-threads
sampaiodiego May 7, 2020
db6f7fc
Fix marking closed threads as read
sampaiodiego May 7, 2020
31cafde
Fix notifications and rooms list updates
sampaiodiego May 8, 2020
d24a451
Merge branch 'develop' into feat/new-threads
sampaiodiego May 8, 2020
add04cc
Follow button
ggazzo May 8, 2020
3ee42b6
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 8, 2020
5b87fb0
Show follow on reply
sampaiodiego May 8, 2020
1145fcb
Vertical Bar padding
ggazzo May 8, 2020
1324515
Regression e2e icon
ggazzo May 8, 2020
b9b19a0
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 8, 2020
89f7125
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo May 8, 2020
a740aa8
Merge branch 'develop' into feat/new-threads
sampaiodiego May 9, 2020
b25b6ae
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo May 10, 2020
c868bba
Fix Thread list
ggazzo May 10, 2020
3a1015d
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 10, 2020
fad71e6
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo May 10, 2020
a9e776e
Fix rich message
ggazzo May 11, 2020
4918ad7
Fix editing parent message shows in the list
ggazzo May 11, 2020
ee91cb8
Fix calling multiple readThread
ggazzo May 11, 2020
d2df2c6
Send also label
ggazzo May 11, 2020
35738ca
Fix border radius thread popout
ggazzo May 12, 2020
8da6244
Fix Thread header size and borde radius
ggazzo May 12, 2020
d454a76
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo May 12, 2020
ccb063f
Ops truncate text
ggazzo May 12, 2020
66d155e
Fix multiple useEffects and header colors
ggazzo May 12, 2020
3c567f4
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo May 12, 2020
a545707
Merge branch 'develop' into feat/new-threads
ggazzo May 12, 2020
ac37c50
Fix Border Radius
ggazzo May 12, 2020
9234399
Fix editing main thread message
sampaiodiego May 12, 2020
f294f0b
Keep history of deleted threads
sampaiodiego May 12, 2020
c23eafe
Merge branch 'develop' into feat/new-threads
sampaiodiego May 13, 2020
94886bc
Merge branch 'develop' into feat/new-threads
sampaiodiego May 13, 2020
652d3d6
Use last reply ('lr') on subscription to sort rooms list
sampaiodiego May 14, 2020
844a82c
Make mentioned user auto-follow threads
sampaiodiego May 14, 2020
5944b4b
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
sampaiodiego May 14, 2020
c8db61f
Send notification to mentioned users
sampaiodiego May 14, 2020
66de843
Merge branch 'develop' into feat/new-threads
sampaiodiego May 14, 2020
1a998dd
Fix send also
ggazzo May 14, 2020
6679b48
Fix jump to message
ggazzo May 14, 2020
b519801
Fix reply button inside mentions
ggazzo May 14, 2020
cfe7aad
Fix mentions
ggazzo May 14, 2020
a29c195
Lint
ggazzo May 14, 2020
7682fb4
Fix old threads are not being displayed
ggazzo May 15, 2020
9286409
Merge branch 'develop' into feat/new-threads
ggazzo May 15, 2020
8c9b05e
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo May 15, 2020
50237a1
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 15, 2020
58bf200
Merge branch 'develop' into feat/new-threads
ggazzo May 16, 2020
1d2a6c4
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo May 16, 2020
783dc9b
Fix outgoing table
ggazzo May 16, 2020
b1ef036
Merge branch 'regressin/outgoin' of github.com:RocketChat/Rocket.Chat…
ggazzo May 16, 2020
abadb62
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo May 16, 2020
a6119a6
Merge branch 'develop' into feat/new-threads
ggazzo May 19, 2020
3a6b612
Merge branch 'develop' into feat/new-threads
ggazzo May 19, 2020
e38a519
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo May 29, 2020
eb8359f
Threads list virtualized
ggazzo Jun 3, 2020
969b558
chat.getThreadsList allows text and types
ggazzo Jun 3, 2020
70c627e
Renamed Components
ggazzo Jun 3, 2020
9d1caf5
Improved hooks for subscriptions and rooms
ggazzo Jun 3, 2020
a41d241
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Jun 3, 2020
cebd2dc
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 3, 2020
2c56c1e
Fix paddings
ggazzo Jun 3, 2020
2b5b514
Fix borders
ggazzo Jun 3, 2020
25b0f13
Lint
ggazzo Jun 3, 2020
8a1659e
Undo storybook main
ggazzo Jun 3, 2020
ff1de26
Allow users to expand/collapse the thread
ggazzo Jun 4, 2020
8605df2
Expand/Collapse ThreadView
ggazzo Jun 4, 2020
2cb10a9
Merge branch 'develop' into feat/new-threads
ggazzo Jun 4, 2020
24ebe08
Expand/Collapse ThreadView
ggazzo Jun 4, 2020
2e6b050
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 4, 2020
230287e
Updated Mention colors
ggazzo Jun 5, 2020
38eff67
Fix Bell size
ggazzo Jun 5, 2020
66d10bb
Fix mentions paddings
ggazzo Jun 5, 2020
d06fa6d
Persists Collapsed/Expanded
ggazzo Jun 5, 2020
979f2e6
Lint
ggazzo Jun 5, 2020
c3cd055
Keep threadlist opened
ggazzo Jun 8, 2020
3020f51
Improve render code
ggazzo Jun 8, 2020
1a2acdf
Fiz member list
ggazzo Jun 8, 2020
f82cbba
Fix lint
ggazzo Jun 8, 2020
f388313
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Jun 8, 2020
4bb41c0
Merge branch 'develop' into feat/new-threads
ggazzo Jun 9, 2020
8c44714
Fix 'calling multiple times getThreadMessages'
ggazzo Jun 9, 2020
7fd963c
Fix edit message thread
ggazzo Jun 9, 2020
2179a90
Move the unread badge
ggazzo Jun 9, 2020
5f437c5
Small bug fix
ggazzo Jun 9, 2020
859a782
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Jun 9, 2020
c5f541d
package-lock
ggazzo Jun 9, 2020
397c8ee
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 9, 2020
f651a8b
Fiz quote and animation
ggazzo Jun 10, 2020
f81fe3e
Fix count threads
ggazzo Jun 10, 2020
a3cdb7c
Move hooks folder
ggazzo Jun 10, 2020
66ddfdb
Merge branch 'develop' into feat/new-threads
ggazzo Jun 10, 2020
3a08687
Changed Thread padding
ggazzo Jun 10, 2020
6d89b8c
Updated timeAgoFunction
ggazzo Jun 10, 2020
d92db8f
Fix lint
ggazzo Jun 10, 2020
de8ad66
Change Mentions Colors
ggazzo Jun 10, 2020
4efcc5b
Prune allow users to ignore threads during prune messages
ggazzo Jun 10, 2020
01d47a9
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 10, 2020
26695b5
Merge branch 'develop' into feat/new-threads
ggazzo Jun 10, 2020
432b574
Do not render as LI
ggazzo Jun 10, 2020
e4f3ce7
Re Re updade Message Thread Template
ggazzo Jun 10, 2020
23fb14c
Autofollow for DM's
ggazzo Jun 11, 2020
c41db51
Lint
ggazzo Jun 11, 2020
fabc7e0
Allow user to decides show messages in main thread
ggazzo Jun 11, 2020
12306ef
Use real names
ggazzo Jun 11, 2020
f29c20d
Merge branch 'develop' into feat/new-threads
ggazzo Jun 11, 2020
5a1d70d
Fiz e2e test
ggazzo Jun 11, 2020
a5a6a39
Fix invalid date
sampaiodiego Jun 12, 2020
eba5de9
Improve replies
sampaiodiego Jun 12, 2020
284f6f3
Regression: Fix openRoom
ggazzo Jun 12, 2020
2a5157d
Fix unread over contextua bar
ggazzo Jun 12, 2020
93697c3
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Jun 12, 2020
0201281
Merge branch 'develop' into feat/new-threads
ggazzo Jun 12, 2020
7d21efe
Merge branch 'develop' into feat/new-threads
ggazzo Jun 13, 2020
cacc902
Link redirect to threads
ggazzo Jun 16, 2020
c3d1cce
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 16, 2020
1fc4825
Merge branch 'develop' into feat/new-threads
ggazzo Jun 16, 2020
02ffe19
Missing className props in Settings Field comp (#17924)
gabriellsh Jun 16, 2020
1eb303a
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Jun 18, 2020
4ea9338
Readd old style to allow threads my main thread... sorry
ggazzo Jun 18, 2020
d1f517f
Send Also in main thread first send
ggazzo Jun 18, 2020
f831551
Thread title rendering mentions
ggazzo Jun 18, 2020
194289e
Fix colors
ggazzo Jun 18, 2020
9546e22
Fix empty message body
ggazzo Jun 18, 2020
2971b86
Merge branch 'develop' into feat/new-threads
ggazzo Jun 18, 2020
69b38ce
Fix after send message callback
ggazzo Jun 19, 2020
923cc0b
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 19, 2020
02a8447
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
tassoevan Jun 20, 2020
e74e773
Fix lint errors
tassoevan Jun 20, 2020
e0f5fda
Merge branch 'develop' into feat/new-threads
tassoevan Jun 20, 2020
5d8cb05
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into feat…
ggazzo Jun 20, 2020
cf3325f
Fix review
ggazzo Jun 21, 2020
eaadf2e
Merge branch 'feat/new-threads' of github.com:RocketChat/Rocket.Chat …
ggazzo Jun 21, 2020
fbc4b56
Fix broken Setting key
tassoevan Jun 21, 2020
c2d0c69
Pass className prop through Setting
tassoevan Jun 21, 2020
3cc5eca
Merge branch 'develop' into feat/new-threads
tassoevan Jun 21, 2020
ef72a52
Remove unused variable
tassoevan Jun 21, 2020
9367d01
Fix federation
sampaiodiego Jun 21, 2020
0ed366a
Fix LGTM alerts
sampaiodiego Jun 21, 2020
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
19 changes: 16 additions & 3 deletions app/api/server/v1/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { executeSetReaction } from '../../../reactions/server/setReaction';
import { API } from '../api';
import Rooms from '../../../models/server/models/Rooms';
import Users from '../../../models/server/models/Users';
import Subscriptions from '../../../models/server/models/Subscriptions';
import { settings } from '../../../settings';
import { findMentionedMessages, findStarredMessages, findSnippetedMessageById, findSnippetedMessages, findDiscussionsFromRoom } from '../lib/messages';

Expand Down Expand Up @@ -427,9 +428,10 @@ API.v1.addRoute('chat.getPinnedMessages', { authRequired: true }, {

API.v1.addRoute('chat.getThreadsList', { authRequired: true }, {
get() {
const { rid } = this.queryParams;
const { rid, type, text } = this.queryParams;
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();

if (!rid) {
throw new Meteor.Error('The required "rid" query param is missing.');
}
Expand All @@ -441,9 +443,20 @@ API.v1.addRoute('chat.getThreadsList', { authRequired: true }, {
if (!canAccessRoom(room, user)) {
throw new Meteor.Error('error-not-allowed', 'Not Allowed');
}
const threadQuery = Object.assign({}, query, { rid, tcount: { $exists: true } });

const typeThread = {
...type === 'following' && { replies: { $in: [this.userId] } },
...type === 'unread' && { _id: { $in: Subscriptions.findOneByRoomIdAndUserId(room._id, user._id).tunread } },
...text && {
$text: {
$search: text,
},
},
};

const threadQuery = { ...query, ...typeThread, rid, tcount: { $exists: true } };
const cursor = Messages.find(threadQuery, {
sort: sort || { ts: 1 },
sort: sort || { tlm: -1 },
skip: offset,
limit: count,
fields,
Expand Down
5 changes: 3 additions & 2 deletions app/api/server/v1/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ API.v1.addRoute('rooms.cleanHistory', { authRequired: true }, {
oldest,
inclusive,
limit: this.bodyParams.limit,
excludePinned: this.bodyParams.excludePinned,
filesOnly: this.bodyParams.filesOnly,
excludePinned: [true, 'true', 1, '1'].includes(this.bodyParams.excludePinned),
filesOnly: [true, 'true', 1, '1'].includes(this.bodyParams.filesOnly),
ignoreThreads: [true, 'true', 1, '1'].includes(this.bodyParams.ignoreThreads),
fromUsers: this.bodyParams.users,
}));

Expand Down
1 change: 1 addition & 0 deletions app/api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ API.v1.addRoute('users.setPreferences', { authRequired: true }, {
highlights: Match.Maybe(Array),
desktopNotificationRequireInteraction: Match.Maybe(Boolean),
messageViewMode: Match.Maybe(Number),
showMessageInMainThread: Match.Maybe(Boolean),
hideUsernames: Match.Maybe(Boolean),
hideRoles: Match.Maybe(Boolean),
hideAvatars: Match.Maybe(Boolean),
Expand Down
15 changes: 15 additions & 0 deletions app/channel-settings/client/views/channelSettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,21 @@
</div>
</div>
{{/with}}
{{#with settings.retentionKeepThreads}}
<div class="rc-user-info__row">
<div class="rc-switch rc-switch--blue">
<label class="rc-switch__label">
<span class="rc-switch__text">
{{_ label}}{{equal default value '*'}}
</span>
<input type="checkbox" class="rc-switch__input js-input-check" name="retentionKeepThreads" checked="{{checked}}" disabled="{{./disabled}}">
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
</label>
</div>
</div>
{{/with}}
{{/if}}
{{/if}}
</div>
Expand Down
12 changes: 11 additions & 1 deletion app/channel-settings/server/methods/saveRoomSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { saveRoomTokenpass } from '../functions/saveRoomTokens';
import { saveStreamingOptions } from '../functions/saveStreamingOptions';
import { RoomSettingsEnum, roomTypes } from '../../../utils';

const fields = ['featured', 'roomName', 'roomTopic', 'roomAnnouncement', 'roomCustomFields', 'roomDescription', 'roomType', 'readOnly', 'reactWhenReadOnly', 'systemMessages', 'default', 'joinCode', 'tokenpass', 'streamingOptions', 'retentionEnabled', 'retentionMaxAge', 'retentionExcludePinned', 'retentionFilesOnly', 'retentionOverrideGlobal', 'encrypted', 'favorite'];
const fields = ['featured', 'roomName', 'roomTopic', 'roomAnnouncement', 'roomCustomFields', 'roomDescription', 'roomType', 'readOnly', 'reactWhenReadOnly', 'systemMessages', 'default', 'joinCode', 'tokenpass', 'streamingOptions', 'retentionEnabled', 'retentionMaxAge', 'retentionExcludePinned', 'retentionFilesOnly', 'retentionIgnoreThreads', 'retentionOverrideGlobal', 'encrypted', 'favorite'];
Meteor.methods({
saveRoomSettings(rid, settings, value) {
const userId = Meteor.userId();
Expand Down Expand Up @@ -128,10 +128,17 @@ Meteor.methods({
action: 'Editing_room',
});
}
if (setting === 'retentionIgnoreThreads' && !hasPermission(userId, 'edit-room-retention-policy', rid) && value !== room.retention.ignoreThreads) {
throw new Meteor.Error('error-action-not-allowed', 'Editing room retention policy is not allowed', {
method: 'saveRoomSettings',
action: 'Editing_room',
});
}
if (setting === 'retentionOverrideGlobal') {
delete settings.retentionMaxAge;
delete settings.retentionExcludePinned;
delete settings.retentionFilesOnly;
delete settings.retentionIgnoreThreads;
}
});

Expand Down Expand Up @@ -215,6 +222,9 @@ Meteor.methods({
case 'retentionFilesOnly':
Rooms.saveRetentionFilesOnlyById(rid, value);
break;
case 'retentionIgnoreThreads':
Rooms.saveRetentionIgnoreThreadsById(rid, value);
break;
case 'retentionOverrideGlobal':
Rooms.saveRetentionOverrideGlobalById(rid, value);
break;
Expand Down
5 changes: 5 additions & 0 deletions app/discussion/client/public/stylesheets/discussion.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

padding: 0.5rem 0;
align-items: center;

flex-wrap: wrap;
}

.discussion-reply-lm {
Expand All @@ -11,6 +13,9 @@
color: var(--color-gray);

font-size: 12px;

flex-grow: 0;
flex-shrink: 0;
}

.discussions-list .load-more {
Expand Down
10 changes: 10 additions & 0 deletions app/discussion/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ Meteor.startup(() => {
i18nDescription: 'RetentionPolicy_DoNotExcludeDiscussion_Description',
enableQuery: globalQuery,
});

settings.add('RetentionPolicy_DoNotExcludeThreads', true, {
group: 'RetentionPolicy',
section: 'Global Policy',
type: 'boolean',
public: true,
i18nLabel: 'RetentionPolicy_DoNotExcludeThreads',
i18nDescription: 'RetentionPolicy_DoNotExcludeThreads_Description',
enableQuery: globalQuery,
});
});
2 changes: 1 addition & 1 deletion app/emoji-emojione/client/emojione-sprites.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
image-rendering: optimizeQuality;
}

.emojione.big {
.message .emojione.big {
width: 44px;
height: 44px;
}
6 changes: 0 additions & 6 deletions app/federation/server/endpoints/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { getUpload, requestEventsFromLatest } from '../handler';
import { notifyUsersOnMessage } from '../../../lib/server/lib/notifyUsersOnMessage';
import { sendAllNotifications } from '../../../lib/server/lib/sendNotificationsOnMessage';
import { processThreads } from '../../../threads/server/hooks/aftersavemessage';
import { processDeleteInThread } from '../../../threads/server/hooks/afterdeletemessage';

const eventHandlers = {
//
Expand Down Expand Up @@ -312,11 +311,6 @@ const eventHandlers = {
if (eventResult.success) {
const { data: { roomId, messageId } } = event;

const message = Messages.findOne({ _id: messageId });
if (message) {
processDeleteInThread(message);
}

// Remove the message
Messages.removeById(messageId);

Expand Down
2 changes: 1 addition & 1 deletion app/lib/lib/roomTypes/direct.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class DirectMessageRoomRoute extends RoomTypeRouteConfig {
constructor() {
super({
name: 'direct',
path: '/direct/:rid',
path: '/direct/:rid/:tab?/:context?',
});
}

Expand Down
2 changes: 1 addition & 1 deletion app/lib/lib/roomTypes/private.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class PrivateRoomRoute extends RoomTypeRouteConfig {
constructor() {
super({
name: 'group',
path: '/group/:name',
path: '/group/:name/:tab?/:context?',
});
}

Expand Down
2 changes: 1 addition & 1 deletion app/lib/lib/roomTypes/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class PublicRoomRoute extends RoomTypeRouteConfig {
constructor() {
super({
name: 'channel',
path: '/channel/:name',
path: '/channel/:name/:tab?/:context?',
});
}

Expand Down
6 changes: 4 additions & 2 deletions app/lib/server/functions/cleanRoomHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FileUpload } from '../../../file-upload';
import { Messages, Rooms } from '../../../models';
import { Notifications } from '../../../notifications';

export const cleanRoomHistory = function({ rid, latest = new Date(), oldest = new Date('0001-01-01T00:00:00Z'), inclusive = true, limit = 0, excludePinned = true, ignoreDiscussion = true, filesOnly = false, fromUsers = [] }) {
export const cleanRoomHistory = function({ rid, latest = new Date(), oldest = new Date('0001-01-01T00:00:00Z'), inclusive = true, limit = 0, excludePinned = true, ignoreDiscussion = true, filesOnly = false, fromUsers = [], ignoreThreads = true }) {
const gt = inclusive ? '$gte' : '$gt';
const lt = inclusive ? '$lte' : '$lt';

Expand All @@ -20,6 +20,7 @@ export const cleanRoomHistory = function({ rid, latest = new Date(), oldest = ne
ignoreDiscussion,
ts,
fromUsers,
ignoreThreads,
{ fields: { 'file._id': 1, pinned: 1 }, limit },
).forEach((document) => {
FileUpload.getStore('Uploads').deleteById(document.file._id);
Expand All @@ -28,12 +29,13 @@ export const cleanRoomHistory = function({ rid, latest = new Date(), oldest = ne
Messages.update({ _id: document._id }, { $unset: { file: 1 }, $set: { attachments: [{ color: '#FD745E', text }] } });
}
});

if (filesOnly) {
return fileCount;
}

if (!ignoreDiscussion) {
Messages.findDiscussionByRoomIdPinnedTimestampAndUsers(rid, excludePinned, ts, fromUsers, { fields: { drid: 1 }, ...limit && { limit } }).fetch()
Messages.findDiscussionByRoomIdPinnedTimestampAndUsers(rid, excludePinned, ts, fromUsers, { fields: { drid: 1 }, ...limit && { limit } }, ignoreThreads).fetch()
.forEach(({ drid }) => deleteRoom(drid));
}

Expand Down
5 changes: 3 additions & 2 deletions app/lib/server/functions/deleteMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import { callbacks } from '../../../callbacks/server';
import { Apps } from '../../../apps/server';

export const deleteMessage = function(message, user) {
const keepHistory = settings.get('Message_KeepHistory');
const showDeletedStatus = settings.get('Message_ShowDeletedStatus');
const deletedMsg = Messages.findOneById(message._id);
const isThread = deletedMsg.tcount > 0;
const keepHistory = settings.get('Message_KeepHistory') || isThread;
const showDeletedStatus = settings.get('Message_ShowDeletedStatus') || isThread;

if (deletedMsg && Apps && Apps.isLoaded()) {
const prevent = Promise.await(Apps.getBridges().getListenerBridge().messageEvent('IPreMessageDeletePrevent', deletedMsg));
Expand Down
5 changes: 3 additions & 2 deletions app/lib/server/functions/notifications/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function shouldNotifyAudio({
hasMentionToUser,
hasReplyToThread,
roomType,
isThread,
}) {
if (disableAllMessageNotifications && audioNotifications == null && !hasReplyToThread) {
return false;
Expand All @@ -23,15 +24,15 @@ export function shouldNotifyAudio({
}

if (!audioNotifications) {
if (settings.get('Accounts_Default_User_Preferences_audioNotifications') === 'all') {
if (settings.get('Accounts_Default_User_Preferences_audioNotifications') === 'all' && (!isThread || hasReplyToThread)) {
return true;
}
if (settings.get('Accounts_Default_User_Preferences_audioNotifications') === 'nothing') {
return false;
}
}

return roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || audioNotifications === 'all' || hasMentionToUser || hasReplyToThread;
return (roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || audioNotifications === 'all' || hasMentionToUser) && (!isThread || hasReplyToThread);
}

export function notifyAudioUser(userId, message, room) {
Expand Down
6 changes: 4 additions & 2 deletions app/lib/server/functions/notifications/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function notifyDesktopUser({
payload: {
_id: message._id,
rid: message.rid,
tmid: message.tmid,
sender: message.u,
type: room.t,
name: room.name,
Expand All @@ -52,6 +53,7 @@ export function shouldNotifyDesktop({
hasMentionToUser,
hasReplyToThread,
roomType,
isThread,
}) {
if (disableAllMessageNotifications && desktopNotifications == null && !isHighlighted && !hasMentionToUser && !hasReplyToThread) {
return false;
Expand All @@ -62,13 +64,13 @@ export function shouldNotifyDesktop({
}

if (!desktopNotifications) {
if (settings.get('Accounts_Default_User_Preferences_desktopNotifications') === 'all') {
if (settings.get('Accounts_Default_User_Preferences_desktopNotifications') === 'all' && (!isThread || hasReplyToThread)) {
return true;
}
if (settings.get('Accounts_Default_User_Preferences_desktopNotifications') === 'nothing') {
return false;
}
}

return roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || desktopNotifications === 'all' || hasMentionToUser || hasReplyToThread;
return (roomType === 'd' || (!disableAllMessageNotifications && (hasMentionToAll || hasMentionToHere)) || isHighlighted || desktopNotifications === 'all' || hasMentionToUser) && (!isThread || hasReplyToThread);
}
3 changes: 2 additions & 1 deletion app/lib/server/functions/notifications/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export function shouldNotifyEmail({
hasMentionToAll,
hasReplyToThread,
roomType,
isThread,
}) {
// email notifications are disabled globally
if (!settings.get('Accounts_AllowEmailNotifications')) {
Expand Down Expand Up @@ -220,5 +221,5 @@ export function shouldNotifyEmail({
}
}

return roomType === 'd' || isHighlighted || emailNotifications === 'all' || hasMentionToUser || hasReplyToThread || (!disableAllMessageNotifications && hasMentionToAll);
return (roomType === 'd' || isHighlighted || emailNotifications === 'all' || hasMentionToUser || (!disableAllMessageNotifications && hasMentionToAll)) && (!isThread || hasReplyToThread);
}
6 changes: 4 additions & 2 deletions app/lib/server/functions/notifications/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export async function getPushData({ room, message, userId, receiverUsername, sen
type: room.t,
name: room.name,
messageType: message.t,
tmid: message.tmid,
},
roomName: settings.get('Push_show_username_room') && roomTypes.getConfig(room.t).isGroupChat(room) ? `#${ roomTypes.getRoomName(room.t, room) }` : '',
username,
Expand All @@ -69,6 +70,7 @@ export function shouldNotifyMobile({
hasMentionToUser,
hasReplyToThread,
roomType,
isThread,
}) {
if (disableAllMessageNotifications && mobilePushNotifications == null && !isHighlighted && !hasMentionToUser && !hasReplyToThread) {
return false;
Expand All @@ -79,13 +81,13 @@ export function shouldNotifyMobile({
}

if (!mobilePushNotifications) {
if (settings.get('Accounts_Default_User_Preferences_mobileNotifications') === 'all') {
if (settings.get('Accounts_Default_User_Preferences_mobileNotifications') === 'all' && (!isThread || hasReplyToThread)) {
return true;
}
if (settings.get('Accounts_Default_User_Preferences_mobileNotifications') === 'nothing') {
return false;
}
}

return roomType === 'd' || (!disableAllMessageNotifications && hasMentionToAll) || isHighlighted || mobilePushNotifications === 'all' || hasMentionToUser || hasReplyToThread;
return (roomType === 'd' || (!disableAllMessageNotifications && hasMentionToAll) || isHighlighted || mobilePushNotifications === 'all' || hasMentionToUser) && (!isThread || hasReplyToThread);
}
Loading