feat: scheduled topics (#9399)

* feat: scheduled topics

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
This commit is contained in:
gasoved
2021-03-24 21:28:02 +03:00
committed by GitHub
parent 67b09cba5f
commit 077330b764
42 changed files with 594 additions and 125 deletions

View File

@@ -20,7 +20,12 @@ topicsAPI.get = async function (caller, data) {
privileges.topics.get(data.tid, caller.uid),
topics.getTopicData(data.tid),
]);
if (!topic || !userPrivileges.read || !userPrivileges['topics:read'] || (topic.deleted && !userPrivileges.view_deleted)) {
if (
!topic ||
!userPrivileges.read ||
!userPrivileges['topics:read'] ||
!privileges.topics.canViewDeletedScheduled(topic, userPrivileges)
) {
return null;
}