* feat: navigator changes

* fix: remove extra code

* feat: add lang keys
This commit is contained in:
Barış Soner Uşaklı
2020-12-04 11:56:10 -05:00
committed by GitHub
parent 648f6215ef
commit 6669496dba
4 changed files with 202 additions and 78 deletions

View File

@@ -71,7 +71,7 @@ SocketPosts.getRawPost = async function (socket, pid) {
return result.postData.content;
};
SocketPosts.getTimestampByIndex = async function (socket, data) {
SocketPosts.getPostSummaryByIndex = async function (socket, data) {
if (data.index < 0) {
data.index = 0;
}
@@ -90,7 +90,9 @@ SocketPosts.getTimestampByIndex = async function (socket, data) {
if (!canRead) {
throw new Error('[[error:no-privileges]]');
}
return await posts.getPostField(pid, 'timestamp');
const postsData = await posts.getPostSummaryByPids([pid], socket.uid, { stripTags: true });
return postsData[0];
};
SocketPosts.getPost = async function (socket, pid) {