Skip to content

Commit

Permalink
fix(backend): フォロワーへのメッセージの絵文字をemojisに含めるように (#14904)
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk authored Nov 7, 2024
1 parent f1eb17f commit bca690f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/backend/src/server/api/endpoints/i/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const newName = updates.name === undefined ? user.name : updates.name;
const newDescription = profileUpdates.description === undefined ? profile.description : profileUpdates.description;
const newFields = profileUpdates.fields === undefined ? profile.fields : profileUpdates.fields;
const newFollowedMessage = profileUpdates.description === undefined ? profile.followedMessage : profileUpdates.followedMessage;

if (newName != null) {
let hasProhibitedWords = false;
Expand Down Expand Up @@ -494,6 +495,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
]);
}

if (newFollowedMessage != null) {
const tokens = mfm.parse(newFollowedMessage);
emojis = emojis.concat(extractCustomEmojisFromMfm(tokens));
}

updates.emojis = emojis;
updates.tags = tags;

Expand Down

0 comments on commit bca690f

Please sign in to comment.