This commit is contained in:
Inex Code 2021-08-10 22:59:35 +03:00
parent 8ab14c574e
commit b2082f088b

View file

@ -476,7 +476,6 @@ export class VkPuppet {
} }
} }
public async handleMatrixFile( public async handleMatrixFile(
room: IRemoteRoom, room: IRemoteRoom,
data: IFileEvent, data: IFileEvent,
@ -559,7 +558,7 @@ export class VkPuppet {
public async handleMatrixRead( public async handleMatrixRead(
room: IRemoteRoom, room: IRemoteRoom,
eventId: string eventId: string,
) { ) {
const p = this.puppets[room.puppetId]; const p = this.puppets[room.puppetId];
if (!p) { if (!p) {
@ -703,7 +702,7 @@ export class VkPuppet {
break; break;
case AttachmentType.WALL: case AttachmentType.WALL:
rendered = await this.renderWallPost(puppetId, f) rendered = await this.renderWallPost(puppetId, f);
await this.puppet.sendMessage(params, { await this.puppet.sendMessage(params, {
body: rendered, body: rendered,
formattedBody: this.converter.makeHtml(rendered), formattedBody: this.converter.makeHtml(rendered),
@ -711,7 +710,7 @@ export class VkPuppet {
break; break;
case AttachmentType.WALL_REPLY: case AttachmentType.WALL_REPLY:
rendered = await this.renderWallPost(puppetId, f) rendered = await this.renderWallPost(puppetId, f);
await this.puppet.sendMessage(params, { await this.puppet.sendMessage(params, {
body: rendered, body: rendered,
formattedBody: this.converter.makeHtml(rendered), formattedBody: this.converter.makeHtml(rendered),
@ -851,11 +850,11 @@ export class VkPuppet {
}); });
} }
if (post.copy_history !== undefined && post.copy_history !== 0) { if (post.copy_history !== undefined && post.copy_history !== 0) {
const subpost = await this.renderWallPost(puppetId, { wall: post.copy_history[0] }) const subpost = await this.renderWallPost(puppetId, { wall: post.copy_history[0] });
subpost.split("\n").forEach((element) => { subpost.split("\n").forEach((element) => {
formatted += `> ${element}\n`; formatted += `> ${element}\n`;
}); });
}; }
return formatted; return formatted;
}; };