mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 12:01:17 +01:00
refactor: add thumbsOnly option to thumbs retrieval method so that embeds/attachments don't show up in composer thumbnail modal
This commit is contained in:
@@ -215,7 +215,7 @@ topicsAPI.deleteTags = async (caller, { tid }) => {
|
||||
await topics.deleteTopicTags(tid);
|
||||
};
|
||||
|
||||
topicsAPI.getThumbs = async (caller, { tid }) => {
|
||||
topicsAPI.getThumbs = async (caller, { tid, thumbsOnly }) => {
|
||||
if (isFinite(tid)) { // post_uuids can be passed in occasionally, in that case no checks are necessary
|
||||
const [exists, canRead] = await Promise.all([
|
||||
topics.exists(tid),
|
||||
@@ -229,7 +229,7 @@ topicsAPI.getThumbs = async (caller, { tid }) => {
|
||||
}
|
||||
}
|
||||
|
||||
return await topics.thumbs.get(tid);
|
||||
return await topics.thumbs.get(tid, { thumbsOnly });
|
||||
};
|
||||
|
||||
// topicsAPI.addThumb
|
||||
|
||||
Reference in New Issue
Block a user