forked from FoundKeyGang/FoundKey
This commit is contained in:
parent
e3f6d42a47
commit
8bc47baf4f
3 changed files with 18 additions and 2 deletions
|
@ -289,7 +289,7 @@ export const pack = async (
|
|||
|
||||
// Poll
|
||||
if (meId && _note.poll && !hide) {
|
||||
_note.poll = (async (poll) => {
|
||||
_note.poll = (async poll => {
|
||||
const vote = await PollVote
|
||||
.findOne({
|
||||
userId: meId,
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as debug from 'debug';
|
|||
|
||||
import User, { IUser } from '../../../models/user';
|
||||
import Mute from '../../../models/mute';
|
||||
import { pack as packNote } from '../../../models/note';
|
||||
import { pack as packNote, pack } from '../../../models/note';
|
||||
import readNotification from '../common/read-notification';
|
||||
import call from '../call';
|
||||
import { IApp } from '../../../models/app';
|
||||
|
@ -48,6 +48,14 @@ export default async function(
|
|||
}
|
||||
//#endregion
|
||||
|
||||
// Renoteなら再pack
|
||||
if (x.type == 'note' && x.body.renoteId != null) {
|
||||
x.body.renote = await pack(x.body.renoteId, user, {
|
||||
detail: true
|
||||
});
|
||||
data = JSON.stringify(x);
|
||||
}
|
||||
|
||||
connection.send(data);
|
||||
} catch (e) {
|
||||
connection.send(data);
|
||||
|
|
|
@ -3,6 +3,7 @@ import * as redis from 'redis';
|
|||
|
||||
import { IUser } from '../../../models/user';
|
||||
import Mute from '../../../models/mute';
|
||||
import { pack } from '../../../models/note';
|
||||
|
||||
export default async function(
|
||||
request: websocket.request,
|
||||
|
@ -31,6 +32,13 @@ export default async function(
|
|||
}
|
||||
//#endregion
|
||||
|
||||
// Renoteなら再pack
|
||||
if (note.renoteId != null) {
|
||||
note.renote = await pack(note.renoteId, user, {
|
||||
detail: true
|
||||
});
|
||||
}
|
||||
|
||||
connection.send(JSON.stringify({
|
||||
type: 'note',
|
||||
body: note
|
||||
|
|
Loading…
Reference in a new issue