diff --git a/migration/1586641139527-remote-reaction.ts b/migration/1586641139527-remote-reaction.ts new file mode 100644 index 000000000..5a7fb36e3 --- /dev/null +++ b/migration/1586641139527-remote-reaction.ts @@ -0,0 +1,12 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class remoteReaction1586641139527 implements MigrationInterface { + name = 'remoteReaction1586641139527' + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(260)`, undefined); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`, undefined); + } +} diff --git a/src/client/components/note.vue b/src/client/components/note.vue index 18d5cc34b..a39520fb4 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -301,6 +301,14 @@ export default Vue.extend({ case 'reacted': { const reaction = body.reaction; + if (body.emoji) { + const emojis = this.appearNote.emojis || []; + if (!emojis.includes(body.emoji)) { + emojis.push(body.emoji); + Vue.set(this.appearNote, 'emojis', emojis); + } + } + if (this.appearNote.reactions == null) { Vue.set(this.appearNote, 'reactions', {}); } diff --git a/src/client/components/notification.vue b/src/client/components/notification.vue index f415887e7..97a2fe187 100644 --- a/src/client/components/notification.vue +++ b/src/client/components/notification.vue @@ -12,7 +12,7 @@ - +
diff --git a/src/client/components/reaction-icon.vue b/src/client/components/reaction-icon.vue index 9155c5944..3c6d56b80 100644 --- a/src/client/components/reaction-icon.vue +++ b/src/client/components/reaction-icon.vue @@ -1,5 +1,5 @@