Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Message Template React Component #23971

Merged
merged 132 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
08f4b1f
WIP
ggazzo Apr 6, 2021
94513fc
wip
ggazzo Apr 8, 2021
6c23973
WIP
ggazzo Apr 12, 2021
3c835ba
early adopter
ggazzo May 10, 2021
4b8945e
loadMore
ggazzo May 10, 2021
26de54e
done
ggazzo May 11, 2021
7c24219
Early adoption
ggazzo May 11, 2021
25ac16b
Done
ggazzo May 11, 2021
1c24df4
bump message-parser
ggazzo May 11, 2021
3ccdc57
it will no pass anyway
ggazzo May 7, 2021
1896d6d
Revert typescript bump
sampaiodiego May 7, 2021
c4f71d5
WIP
ggazzo Apr 6, 2021
4c968ec
wip
ggazzo Apr 8, 2021
05b0ba8
WIP
ggazzo Apr 12, 2021
09c45e1
early adopter
ggazzo May 10, 2021
c7f0a2d
loadMore
ggazzo May 10, 2021
aaffe89
Merge branch 'message-write' into message-template-2
ggazzo May 11, 2021
59c060c
Working after merge
ggazzo May 11, 2021
02a81cb
WIP
ggazzo May 11, 2021
b31b990
useIsVisible
ggazzo May 11, 2021
5cc06c4
MessageAction -> ts
ggazzo May 11, 2021
52e2a1a
MessageAction
ggazzo May 11, 2021
eb646f7
move MessageAction.addButton -> ts
ggazzo May 11, 2021
3b52450
MessageAction Working for old render
ggazzo May 12, 2021
89211ff
Action working for both
ggazzo May 12, 2021
d8aafe3
WIP
ggazzo May 12, 2021
0ca3b80
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo May 13, 2021
1d03892
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
ggazzo Jun 16, 2021
300e0e0
test
ggazzo Jun 16, 2021
aa2a52d
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo Sep 17, 2021
796dd43
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
ggazzo Sep 20, 2021
77139bd
WIP
ggazzo Sep 21, 2021
5491b7e
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into develop
ggazzo Sep 28, 2021
ddd788c
Merge branch 'develop' into message-template-2
ggazzo Sep 28, 2021
130c3f1
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
ggazzo Oct 8, 2021
803ca6e
fix message imports
ggazzo Oct 11, 2021
abc41af
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Oct 18, 2021
c99aa9f
WIP new menu
ggazzo Oct 19, 2021
a9be15d
wio
ggazzo Oct 19, 2021
90fac0b
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
ggazzo Oct 21, 2021
47540f0
WIP
ggazzo Oct 27, 2021
1a69344
Message Date Separator
ggazzo Oct 28, 2021
9130744
Thread Message
ggazzo Oct 29, 2021
2aa9996
Private message indicators
ggazzo Oct 29, 2021
b1a581f
Tooltip refactor and Reaction tooltips
ggazzo Nov 4, 2021
1a985d7
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 1, 2021
4ce9b20
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 3, 2021
24c7ced
render emoji
ggazzo Dec 7, 2021
2673066
Open thread and open discussion
ggazzo Dec 7, 2021
f53e366
Open usercards on mention and username click
ggazzo Dec 7, 2021
47b3599
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 7, 2021
03c5d11
WIP
ggazzo Dec 10, 2021
063875e
improve oembed conversion
ggazzo Dec 13, 2021
8807beb
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 13, 2021
7f5c240
bump fuselage
ggazzo Dec 16, 2021
d9c8a96
fix lint
ggazzo Dec 16, 2021
d31d45a
fix LGTM
ggazzo Dec 16, 2021
28fdf37
fix lint
ggazzo Dec 16, 2021
38eabba
Update base_old.css
ggazzo Dec 17, 2021
6abaccb
..
ggazzo Dec 17, 2021
1da4107
...
ggazzo Dec 17, 2021
be2c882
...
ggazzo Dec 17, 2021
0ce20f2
WIP
ggazzo Dec 18, 2021
2acdedc
types
ggazzo Dec 20, 2021
6e2f9ab
finished types
ggazzo Dec 20, 2021
4c472d8
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 22, 2021
3e5362e
lint
ggazzo Dec 22, 2021
bbcb71d
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 22, 2021
f2b34c1
Merge branch 'develop' into message-template-2
ggazzo Dec 28, 2021
91eb93c
temp fix
ggazzo Dec 28, 2021
13f73a9
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 29, 2021
2c0bc01
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Dec 29, 2021
ab83275
fix ee services
ggazzo Dec 30, 2021
86a76fe
Fiz username/realname logic
ggazzo Dec 30, 2021
9680546
Merge branch 'develop' into message-template-2
tassoevan Jan 3, 2022
94135e2
e2e message placeholder
yash-rajpal Jan 20, 2022
bea0508
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
gabriellsh Jan 25, 2022
535bcb2
Merge branch 'develop' into message-template-2
gabriellsh Feb 7, 2022
bbff544
fix undefined authorname
gabriellsh Feb 7, 2022
3b85087
fix hook message
gabriellsh Feb 15, 2022
ec9e09c
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
gabriellsh Feb 15, 2022
f2307b8
fix: remove symlink to deleted file
Feb 18, 2022
04baf85
fix: check if inputValue is string
Feb 18, 2022
dd94c16
fix: remove wrong prop
Feb 18, 2022
2ebd9b6
fix: icon type
Feb 18, 2022
440f2db
fix: add missing prop on component
Feb 18, 2022
edf357b
fix: check if subscription has unread
Feb 22, 2022
ff7cd34
fix: rename test to spec
Feb 22, 2022
79150b0
fix: unread message label
Feb 22, 2022
7dd1fd9
fix: disable eslint rule line on ee
Feb 22, 2022
f42f493
fix: removve undescore use typeof
Feb 22, 2022
0f3b5b4
feat: add is read receipt icon
Feb 22, 2022
308661f
Add oembed
gabriellsh Feb 22, 2022
52a60db
Remove comment
gabriellsh Feb 23, 2022
e833fea
fix: remove only
Feb 23, 2022
02d3fb7
Fix video width
gabriellsh Feb 25, 2022
7aa0276
Merge pull request #24580 from RocketChat/message/oembed
Feb 25, 2022
a7a6e27
style: remove comment
Feb 28, 2022
40a175f
Merge pull request #24578 from RocketChat/fix-alert-message
Feb 28, 2022
60884c4
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
gabriellsh Feb 28, 2022
2026738
Merge branch 'message-template-2' of github.com:RocketChat/Rocket.Cha…
gabriellsh Feb 28, 2022
373440a
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
tassoevan Feb 28, 2022
7e3f19e
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
tassoevan Mar 2, 2022
27378db
[IMPROVE] Message rewrite code structure (#24723)
gabriellsh Mar 7, 2022
023f05e
[FIX] Message Edition (#24706)
gabriellsh Mar 7, 2022
d94cae3
[FIX] Toolbox on close behavior (#24695)
Mar 7, 2022
71a2afd
Fix e2ee message render
gabriellsh Mar 8, 2022
794647e
Merge pull request #24741 from RocketChat/fix/e2eMessage
Mar 8, 2022
e1ca16f
[NEW] Add Message ignored component (#24763)
Mar 10, 2022
faa7595
[FIX] Reply broadcast (#24778)
Mar 10, 2022
03ec79d
fix: set as IThreadMessage
Mar 10, 2022
3806aec
fix: add key on map
Mar 10, 2022
da1ad2d
[FIX] Edit not working in old template. (#24794)
gabriellsh Mar 10, 2022
41a5da8
[FIX] Sequential messages (#24790)
gabriellsh Mar 10, 2022
139be3b
[NEW] Create preference for switching back to old message template (#…
gabriellsh Mar 14, 2022
72bd028
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
gabriellsh Mar 14, 2022
3e15327
Fix legacy message render
gabriellsh Mar 15, 2022
8041041
Merge branch 'develop' into message-template-2
Mar 18, 2022
20b7eff
fix messageaction
ggazzo Dec 30, 2021
fbeb96b
fix ci
ggazzo Mar 22, 2022
ee518ea
[FIX] jump to recent button and message link load (#24986)
Mar 29, 2022
9f60e38
[FIX] Add title with date and time (#24798)
Mar 31, 2022
2453e16
Update fuselage to next version
juliajforesti Apr 1, 2022
a679d5f
[NEW] Add message highlight and add channel mention (#24878)
Apr 1, 2022
f546ace
Merge remote-tracking branch 'origin/develop' into message-template-2
ggazzo Apr 1, 2022
93546ea
fix
ggazzo Apr 1, 2022
c4829b5
[IMPROVE] Message rewrite (#24866)
juliajforesti Apr 2, 2022
b37b340
Removed prop drilling highlights
ggazzo Apr 2, 2022
ec8e35f
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
gabriellsh Apr 5, 2022
edd8e40
[FIX] Roles not displaying (#25081)
gabriellsh Apr 6, 2022
bee878a
[FIX] CI issues on message rewrite (#24992)
Apr 6, 2022
afff7f8
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into mess…
gabriellsh Apr 7, 2022
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
56 changes: 0 additions & 56 deletions app/action-links/client/lib/actionLinks.js

This file was deleted.

74 changes: 74 additions & 0 deletions app/action-links/client/lib/actionLinks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { Meteor } from 'meteor/meteor';

import { handleError } from '../../../../client/lib/utils/handleError';
import { IMessage } from '../../../../definition/IMessage';

// Action Links namespace creation.
export const actionLinks = {
actions: new Map<string, Function>(),
register(name: string, fn: Function): void {
actionLinks.actions.set(name, fn);
},
// getMessage(name, messageId) {
// const userId = Meteor.userId();
// if (!userId) {
// throw new Meteor.Error('error-invalid-user', 'Invalid user', {
// function: 'actionLinks.getMessage',
// });
// }

// const message = Messages.findOne({ _id: messageId });
// if (!message) {
// throw new Meteor.Error('error-invalid-message', 'Invalid message', {
// function: 'actionLinks.getMessage',
// });
// }

// const subscription = Subscriptions.findOne({
// 'rid': message.rid,
// 'u._id': userId,
// });
// if (!subscription) {
// throw new Meteor.Error('error-not-allowed', 'Not allowed', {
// function: 'actionLinks.getMessage',
// });
// }

// if (!message.actionLinks || !message.actionLinks[name]) {
// throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', {
// function: 'actionLinks.getMessage',
// });
// }

// return message;
// },
run(method: string, message: IMessage, instance: undefined): void {
const actionLink = message.actionLinks && message.actionLinks.find((action) => action.method_id === method);

if (!actionLink) {
throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link');
}

if (!actionLinks.actions.has(actionLink.method_id)) {
throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link');
}

const fn = actionLinks.actions.get(actionLink.method_id);

let ranClient = false;

if (fn) {
// run just on client side
fn(message, actionLink.params, instance);

ranClient = true;
}

// and run on server side
Meteor.call('actionLinkHandler', name, message._id, (err: Error) => {
if (err && !ranClient) {
handleError(err);
}
});
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';

import { AutoTranslate } from './autotranslate';
import { settings } from '../../../settings';
import { hasAtLeastOnePermission } from '../../../authorization';
import { MessageAction } from '../../../ui-utils';
import { settings } from '../../../settings/client';
import { hasAtLeastOnePermission } from '../../../authorization/client';
import { MessageAction } from '../../../ui-utils/client/lib/MessageAction';
import { messageArgs } from '../../../ui-utils/client/lib/messageArgs';
import { Messages } from '../../../models';
import { Messages } from '../../../models/client';
import { isTranslatedMessage } from '../../../../definition/IMessage';

Meteor.startup(() => {
AutoTranslate.init();
Expand All @@ -18,20 +19,20 @@ Meteor.startup(() => {
icon: 'language',
label: 'Translate',
context: ['message', 'message-mobile', 'threads'],
action() {
const { msg: message } = messageArgs(this);
action(_, props) {
const { message = messageArgs(this).msg } = props;
const language = AutoTranslate.getLanguage(message.rid);
if (!message.translations || !message.translations[language]) {
if (!isTranslatedMessage(message) || !message.translations[language]) {
// } && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) {
AutoTranslate.messageIdsToWait[message._id] = true;
(AutoTranslate.messageIdsToWait as any)[message._id] = true;
Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } });
Meteor.call('autoTranslate.translateMessage', message, language);
}
const action = message.autoTranslateShowInverse ? '$unset' : '$set';
const action = 'autoTranslateShowInverse' in message ? '$unset' : '$set';
Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } });
},
condition({ msg, u }) {
return msg && msg.u && msg.u._id !== u._id && msg.translations && !msg.translations.original;
condition({ message, user }) {
return Boolean(message?.u && message.u._id !== user._id && isTranslatedMessage(message) && !message.translations.original);
},
order: 90,
});
Expand All @@ -40,20 +41,20 @@ Meteor.startup(() => {
icon: 'language',
label: 'View_original',
context: ['message', 'message-mobile', 'threads'],
action() {
const { msg: message } = messageArgs(this);
action(_, props) {
const { message = messageArgs(this).msg } = props;
const language = AutoTranslate.getLanguage(message.rid);
if (!message.translations || !message.translations[language]) {
if (!isTranslatedMessage(message) || !message.translations[language]) {
// } && !_.find(message.attachments, attachment => { return attachment.translations && attachment.translations[language]; })) {
AutoTranslate.messageIdsToWait[message._id] = true;
(AutoTranslate.messageIdsToWait as any)[message._id] = true;
Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } });
Meteor.call('autoTranslate.translateMessage', message, language);
}
const action = message.autoTranslateShowInverse ? '$unset' : '$set';
const action = 'autoTranslateShowInverse' in message ? '$unset' : '$set';
Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } });
},
condition({ msg, u }) {
return msg && msg.u && msg.u._id !== u._id && msg.translations && msg.translations.original;
condition({ message, user }) {
return Boolean(message?.u && message.u._id !== user._id && isTranslatedMessage(message) && message.translations.original);
},
order: 90,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Meteor.startup(function () {
icon: 'discussion',
label: 'Discussion_start',
context: ['message', 'message-mobile'],
async action() {
const { msg: message, room } = messageArgs(this);
async action(_, props) {
const { message = messageArgs(this).msg, room } = props;

imperativeModal.open({
component: CreateDiscussion,
Expand All @@ -34,16 +34,16 @@ Meteor.startup(function () {
});
},
condition({
msg: {
message: {
u: { _id: uid },
drid,
dcount,
},
room,
subscription,
u,
user,
}) {
if (drid || !isNaN(dcount)) {
if (drid || !Number.isNaN(dcount)) {
return false;
}
if (!subscription) {
Expand All @@ -54,7 +54,7 @@ Meteor.startup(function () {
return false;
}

return uid !== u._id ? hasPermission('start-discussion-other-user') : hasPermission('start-discussion');
return uid !== user._id ? hasPermission('start-discussion-other-user') : hasPermission('start-discussion');
},
order: 1,
group: 'menu',
Expand Down
24 changes: 24 additions & 0 deletions app/highlight-words/client/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { IMessage } from '../../../definition/IMessage';
import { highlightWords, getRegexHighlight, getRegexHighlightUrl } from './helper';

// TODO: delete this file after message rewrites
export const createHighlightWordsMessageRenderer = ({
wordsToHighlight,
}: {
wordsToHighlight: string[];
}): (<T extends IMessage & { html: string }>(message: T) => T) => {
const highlights = wordsToHighlight.map((highlight) => ({
highlight,
regex: getRegexHighlight(highlight),
urlRegex: getRegexHighlightUrl(highlight),
}));

return <T extends IMessage & { html: string }>(message: T): T => {
if (!message.html?.trim()) {
return message;
}

message.html = highlightWords(message.html, highlights);
return message;
};
};
4 changes: 2 additions & 2 deletions app/highlight-words/client/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ export const removeHighlightedUrls = (msg, highlight, urlMatches) => {
const highlightRegex = new RegExp(highlight, 'gmi');

return urlMatches.reduce((msg, match) => {
const withTemplate = match.replace(highlightRegex, `<span class="highlight-text">${highlight}</span>`);
const withTemplate = match.replace(highlightRegex, `<mark class="highlight-text">${highlight}</mark>`);
const regexWithTemplate = new RegExp(withTemplate, 'i');
return msg.replace(regexWithTemplate, match);
}, msg);
};

const highlightTemplate = '$1<span class="highlight-text">$2</span>$3';
const highlightTemplate = '$1<mark class="highlight-text">$2</mark>$3';

export const getRegexHighlight = (highlight) =>
new RegExp(
Expand Down
1 change: 1 addition & 0 deletions app/highlight-words/client/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { createHighlightWordsMessageRenderer } from './client';
21 changes: 11 additions & 10 deletions app/lib/lib/MessageTypes.js → app/lib/lib/MessageTypes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-disable @typescript-eslint/camelcase */
import { Meteor } from 'meteor/meteor';

import { MessageTypes } from '../../ui-utils';
import { callbacks } from '../../../lib/callbacks';
import { MessageTypes } from '../../ui-utils/lib/MessageTypes';
// import { callbacks } from '../../../lib/callbacks';

Meteor.startup(function () {
MessageTypes.registerType({
Expand Down Expand Up @@ -177,12 +178,12 @@ Meteor.startup(function () {
};
},
});
MessageTypes.registerType({
id: 'rtc',
render(message) {
return callbacks.run('renderRtcMessage', message);
},
});
// MessageTypes.registerType({
// id: 'rtc',
// render(message) {
// return callbacks.run('renderRtcMessage', message);
// },
// });
MessageTypes.registerType({
id: 'user-muted',
system: true,
Expand Down Expand Up @@ -212,7 +213,7 @@ Meteor.startup(function () {
data(message) {
return {
username: message.msg,
role: message.role,
role: message.role || '',
user_by: message.u.username,
};
},
Expand All @@ -224,7 +225,7 @@ Meteor.startup(function () {
data(message) {
return {
username: message.msg,
role: message.role,
role: message.role || '',
user_by: message.u.username,
};
},
Expand Down
10 changes: 5 additions & 5 deletions app/lib/server/functions/attachMessage.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/camelcase */
import { getUserAvatarURL } from '../../../utils/lib/getUserAvatarURL';
import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator';
import { IMessage } from '../../../../definition/IMessage';
Expand All @@ -9,8 +10,8 @@ export const attachMessage = function (
room: IRoom,
): {
text: string;
authorName?: string;
authorIcon: string;
author_name?: string;
author_icon: string;
message_link: string;
attachments?: MessageAttachment[];
ts: Date;
Expand All @@ -24,9 +25,8 @@ export const attachMessage = function (
} = message;
return {
text: msg,
authorName: username,
authorIcon: getUserAvatarURL(username),
// eslint-disable-next-line @typescript-eslint/camelcase
author_name: username,
author_icon: getUserAvatarURL(username),
message_link: `${roomCoordinator.getRouteLink(room.t, room)}?msg=${_id}`,
attachments,
ts,
Expand Down
3 changes: 2 additions & 1 deletion app/lib/server/functions/sendMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { FileUpload } from '../../../file-upload/server';
import { hasPermission } from '../../../authorization/server';
import { SystemLogger } from '../../../../server/lib/logger/system';
import { parseUrlsInMessage } from './parseUrlsInMessage';
import { isE2EEMessage } from '../../../../lib/isE2EEMessage';

const { DISABLE_MESSAGE_PARSER = 'false' } = process.env;

Expand Down Expand Up @@ -246,7 +247,7 @@ export const sendMessage = function (user, message, room, upsert = false) {

message = callbacks.run('beforeSaveMessage', message, room);
try {
if (message.msg && DISABLE_MESSAGE_PARSER !== 'true') {
if (message.msg && DISABLE_MESSAGE_PARSER !== 'true' && !isE2EEMessage(message)) {
message.md = parser(message.msg);
}
} catch (e) {
Expand Down
3 changes: 2 additions & 1 deletion app/lib/server/functions/updateMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { callbacks } from '../../../../lib/callbacks';
import { SystemLogger } from '../../../../server/lib/logger/system';
import { Apps } from '../../../apps/server';
import { parseUrlsInMessage } from './parseUrlsInMessage';
import { isE2EEMessage } from '../../../../lib/isE2EEMessage';
import { IMessage, IMessageEdited } from '../../../../definition/IMessage';
import { IUser } from '../../../../definition/IUser';

Expand Down Expand Up @@ -51,7 +52,7 @@ export const updateMessage = function (message: IMessage, user: IUser, originalM
message = callbacks.run('beforeSaveMessage', message);

try {
if (message.msg && DISABLE_MESSAGE_PARSER !== 'true') {
if (message.msg && DISABLE_MESSAGE_PARSER !== 'true' && !isE2EEMessage(message)) {
message.md = parser(message.msg);
}
} catch (e: unknown) {
Expand Down
Loading