Emoji ID in stream
ci/woodpecker/push/ociImageTag Pipeline was successful
Details
ci/woodpecker/push/ociImageTag Pipeline was successful
Details
This commit is contained in:
parent
e8b6c132fd
commit
9cca1056ec
|
@ -125,6 +125,7 @@ export interface NoteStreamTypes {
|
||||||
reacted: {
|
reacted: {
|
||||||
reaction: string;
|
reaction: string;
|
||||||
emoji?: {
|
emoji?: {
|
||||||
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
} | null;
|
} | null;
|
||||||
|
|
|
@ -1,26 +1,19 @@
|
||||||
import { publishNoteStream } from "@/services/stream.js";
|
import {publishNoteStream} from "@/services/stream.js";
|
||||||
import { renderLike } from "@/remote/activitypub/renderer/like.js";
|
import {renderLike} from "@/remote/activitypub/renderer/like.js";
|
||||||
import DeliverManager from "@/remote/activitypub/deliver-manager.js";
|
import DeliverManager from "@/remote/activitypub/deliver-manager.js";
|
||||||
import { renderActivity } from "@/remote/activitypub/renderer/index.js";
|
import {renderActivity} from "@/remote/activitypub/renderer/index.js";
|
||||||
import { toDbReaction, decodeReaction } from "@/misc/reaction-lib.js";
|
import {decodeReaction, toDbReaction} from "@/misc/reaction-lib.js";
|
||||||
import type { User, IRemoteUser } from "@/models/entities/user.js";
|
import type {IRemoteUser, User} from "@/models/entities/user.js";
|
||||||
import type { Note } from "@/models/entities/note.js";
|
import type {Note} from "@/models/entities/note.js";
|
||||||
import {
|
import {Blockings, Emojis, NoteReactions, Notes, NoteWatchings, Users,} from "@/models/index.js";
|
||||||
NoteReactions,
|
import {IsNull, Not} from "typeorm";
|
||||||
Users,
|
import {perUserReactionsChart} from "@/services/chart/index.js";
|
||||||
NoteWatchings,
|
import {genId} from "@/misc/gen-id.js";
|
||||||
Notes,
|
import {createNotification} from "../../create-notification.js";
|
||||||
Emojis,
|
|
||||||
Blockings,
|
|
||||||
} from "@/models/index.js";
|
|
||||||
import { IsNull, Not } from "typeorm";
|
|
||||||
import { perUserReactionsChart } from "@/services/chart/index.js";
|
|
||||||
import { genId } from "@/misc/gen-id.js";
|
|
||||||
import { createNotification } from "../../create-notification.js";
|
|
||||||
import deleteReaction from "./delete.js";
|
import deleteReaction from "./delete.js";
|
||||||
import { isDuplicateKeyValueError } from "@/misc/is-duplicate-key-value-error.js";
|
import {isDuplicateKeyValueError} from "@/misc/is-duplicate-key-value-error.js";
|
||||||
import type { NoteReaction } from "@/models/entities/note-reaction.js";
|
import type {NoteReaction} from "@/models/entities/note-reaction.js";
|
||||||
import { IdentifiableError } from "@/misc/identifiable-error.js";
|
import {IdentifiableError} from "@/misc/identifiable-error.js";
|
||||||
|
|
||||||
export default async (
|
export default async (
|
||||||
user: { id: User["id"]; host: User["host"] },
|
user: { id: User["id"]; host: User["host"] },
|
||||||
|
@ -109,6 +102,7 @@ export default async (
|
||||||
emoji:
|
emoji:
|
||||||
emoji != null
|
emoji != null
|
||||||
? {
|
? {
|
||||||
|
id: emoji.id,
|
||||||
name: emoji.host
|
name: emoji.host
|
||||||
? `${emoji.name}@${emoji.host}`
|
? `${emoji.name}@${emoji.host}`
|
||||||
: `${emoji.name}@.`,
|
: `${emoji.name}@.`,
|
||||||
|
|
Loading…
Reference in New Issue