mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-18 18:40:58 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
"multer": "2.1.1",
|
||||
"nconf": "0.13.0",
|
||||
"nodebb-plugin-2factor": "7.6.1",
|
||||
"nodebb-plugin-composer-default": "10.3.26",
|
||||
"nodebb-plugin-composer-default": "10.3.27",
|
||||
"nodebb-plugin-dbsearch": "6.4.1",
|
||||
"nodebb-plugin-emoji": "6.0.6",
|
||||
"nodebb-plugin-emoji-android": "4.1.1",
|
||||
|
||||
@@ -324,22 +324,17 @@ define('forum/topic/postTools', [
|
||||
const username = getUserSlug(button);
|
||||
const toPid = getData(button, 'data-pid');
|
||||
|
||||
function quote(text) {
|
||||
hooks.fire('action:composer.addQuote', {
|
||||
tid: tid,
|
||||
pid: toPid,
|
||||
username: username,
|
||||
title: ajaxify.data.titleRaw,
|
||||
text: text,
|
||||
});
|
||||
}
|
||||
const body = selectedNode.text && toPid && toPid === selectedNode.pid ?
|
||||
selectedNode.text :
|
||||
(await api.get(`/posts/${encodeURIComponent(toPid)}/raw`)).content;
|
||||
|
||||
if (selectedNode.text && toPid && toPid === selectedNode.pid) {
|
||||
return quote(selectedNode.text);
|
||||
}
|
||||
|
||||
const { content } = await api.get(`/posts/${encodeURIComponent(toPid)}/raw`);
|
||||
quote(content);
|
||||
hooks.fire('action:composer.addQuote', {
|
||||
tid: tid,
|
||||
pid: toPid,
|
||||
username: username,
|
||||
title: ajaxify.data.titleRaw,
|
||||
body: body,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user