Skip to content

Commit

Permalink
フォロワーへのメッセージの絵文字をemojisに含めるように
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Nov 7, 2024
1 parent 20b9b5c commit 2d4af6d
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 2d4af6d

Please sign in to comment.