diff options
| author | おさむのひと <46447427+samunohito@users.noreply.github.com> | 2025-01-14 21:49:35 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-14 12:49:35 +0000 |
| commit | f45fd01551fb283604297e4c94cca4d04ebf03aa (patch) | |
| tree | fc7ca3d9e9061937085a8360a5501727c83a848e /packages/backend/src/core | |
| parent | fix: node.js の punycode モジュールが使用されている場所があ... (diff) | |
| download | misskey-f45fd01551fb283604297e4c94cca4d04ebf03aa.tar.gz misskey-f45fd01551fb283604297e4c94cca4d04ebf03aa.tar.bz2 misskey-f45fd01551fb283604297e4c94cca4d04ebf03aa.zip | |
enhance(backend): 絵文字の連合でライセンス欄を相互にやり取りするように (#15182)
* enhance(backend): 絵文字の連合でライセンス欄を相互にやり取りするように
Co-authored-by: Kisaragi Marine <kisaragi.effective@gmail.com>
Co-authored-by: ruruke <123709459+ruruke@users.noreply.github.com>
* fix CHANGELOG.md
---------
Co-authored-by: Kisaragi Marine <kisaragi.effective@gmail.com>
Co-authored-by: ruruke <123709459+ruruke@users.noreply.github.com>
Co-authored-by: taichan <40626578+tai-cha@users.noreply.github.com>
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/core')
| -rw-r--r-- | packages/backend/src/core/activitypub/ApRendererService.ts | 3 | ||||
| -rw-r--r-- | packages/backend/src/core/activitypub/models/ApNoteService.ts | 4 | ||||
| -rw-r--r-- | packages/backend/src/core/activitypub/type.ts | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 5617a29bab..9148095067 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -183,6 +183,9 @@ export class ApRendererService { // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ) url: emoji.publicUrl || emoji.originalUrl, }, + _misskey_license: { + freeText: emoji.license + }, }; } diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index cb25aa54b0..8abacd293f 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -408,6 +408,8 @@ export class ApNoteService { originalUrl: tag.icon.url, publicUrl: tag.icon.url, updatedAt: new Date(), + // _misskey_license が存在しなければ `null` + license: (tag._misskey_license?.freeText ?? null) }); const emoji = await this.emojisRepository.findOneBy({ host, name }); @@ -429,6 +431,8 @@ export class ApNoteService { publicUrl: tag.icon.url, updatedAt: new Date(), aliases: [], + // _misskey_license が存在しなければ `null` + license: (tag._misskey_license?.freeText ?? null) }); })); } diff --git a/packages/backend/src/core/activitypub/type.ts b/packages/backend/src/core/activitypub/type.ts index 7496315f09..72732b01df 100644 --- a/packages/backend/src/core/activitypub/type.ts +++ b/packages/backend/src/core/activitypub/type.ts @@ -242,6 +242,11 @@ export interface IApEmoji extends IObject { type: 'Emoji'; name: string; updated: string; + // Misskey拡張。後方互換性のためにoptional。 + // 将来の拡張性を考慮してobjectにしている + _misskey_license?: { + freeText: string | null; + }; } export const isEmoji = (object: IObject): object is IApEmoji => |