Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance: Fedibird形式の絵文字情報連合に対応 #604

Merged
merged 48 commits into from
Jan 10, 2025

Conversation

penginn-net
Copy link
Collaborator

@penginn-net penginn-net commented Dec 27, 2024

What

Enhance: Fedibird形式の絵文字情報連合に対応

Why

Resolve #544

Additional info (optional)

misskey-dev/misskey#10859 (comment)

Checklist

  • コントリビューションガイドを読みました( Read the contribution guide)
  • ローカル環境で動作しました(Test working in a local environment)
  • (必要なら)CHANGELOG_YOJO.mdの更新((If needed) Update CHANGELOG_YOJO.md)
  • (必要なら)テストの追加((If possible) Add tests)

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 140 lines in your changes missing coverage. Please review.

Project coverage is 39.90%. Comparing base (c3e0bc7) to head (8bbb422).
Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/pages/emoji-edit-dialog.vue 0.00% 29 Missing ⚠️
packages/backend/src/core/CustomEmojiService.ts 4.76% 20 Missing ⚠️
...kages/frontend/src/pages/custom-emojis-manager.vue 0.00% 19 Missing ⚠️
...ckend/src/core/activitypub/models/ApNoteService.ts 0.00% 16 Missing ⚠️
...ckend/src/server/api/endpoints/admin/emoji/copy.ts 56.00% 11 Missing ⚠️
...kend/src/server/api/endpoints/admin/emoji/steal.ts 56.00% 11 Missing ⚠️
.../backend/src/core/activitypub/ApRendererService.ts 0.00% 8 Missing ⚠️
...end/src/server/api/endpoints/admin/emoji/update.ts 53.84% 6 Missing ⚠️
...es/backend/src/core/entities/EmojiEntityService.ts 0.00% 5 Missing ⚠️
...e/processors/ImportCustomEmojisProcessorService.ts 0.00% 5 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #604       +/-   ##
============================================
+ Coverage    19.86%   39.90%   +20.04%     
============================================
  Files          797     1698      +901     
  Lines       123252   236435   +113183     
  Branches      1041     3938     +2897     
============================================
+ Hits         24483    94359    +69876     
- Misses       98164   141407    +43243     
- Partials       605      669       +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 27, 2024

이 PR에 의한 api.json 차이

차이점은 여기에서 볼 수 있음
--- base
+++ head
@@ -7295,6 +7295,48 @@
                     "items": {
                       "type": "string"
                     }
+                  },
+                  "copyPermission": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "enum": [
+                      "allow",
+                      "deny",
+                      "conditional",
+                      null
+                    ],
+                    "default": "allow",
+                    "description": "この絵文字を外部サーバーへコピーすることの許可"
+                  },
+                  "usageInfo": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "使用する際の説明"
+                  },
+                  "author": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "作者情報"
+                  },
+                  "description": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "絵文字の説明"
+                  },
+                  "isBasedOn": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "もとになったもののURLなど"
                   }
                 },
                 "required": [
@@ -7505,6 +7547,48 @@
                     "items": {
                       "type": "string"
                     }
+                  },
+                  "copyPermission": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "enum": [
+                      "allow",
+                      "deny",
+                      "conditional",
+                      null
+                    ],
+                    "default": "allow",
+                    "description": "この絵文字を外部サーバーへコピーすることの許可"
+                  },
+                  "usageInfo": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "使用する際の説明"
+                  },
+                  "author": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "作者情報"
+                  },
+                  "description": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "絵文字の説明"
+                  },
+                  "isBasedOn": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "もとになったもののURLなど"
                   }
                 },
                 "required": [
@@ -7679,6 +7763,9 @@
                   "emojiId": {
                     "type": "string",
                     "format": "misskey:id"
+                  },
+                  "usageInfoReaded": {
+                    "type": "boolean"
                   }
                 },
                 "required": [
@@ -7734,6 +7821,24 @@
                       }
                     }
                   },
+                  "NOT_ALLOWED": {
+                    "value": {
+                      "error": {
+                        "message": "Copy is not allowed this emoji.",
+                        "code": "NOT_ALLOWED",
+                        "id": "1beadfcc-3882-f3c9-ee57-ded45e4741e4"
+                      }
+                    }
+                  },
+                  "SEE_USAGEINFOMATION_OR_LICENSE": {
+                    "value": {
+                      "error": {
+                        "message": "see Usage information or license.",
+                        "code": "SEE_USAGEINFOMATION_OR_LICENSE",
+                        "id": "28d9031e-ddbc-5ba3-c435-fcb5259e8408"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -8386,6 +8491,47 @@
                       },
                       "url": {
                         "type": "string"
+                      },
+                      "copyPermission": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "enum": [
+                          "allow",
+                          "deny",
+                          "conditional",
+                          null
+                        ],
+                        "description": "この絵文字を外部サーバーへコピーすることの許可"
+                      },
+                      "usageInfo": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "使用する際の説明"
+                      },
+                      "author": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "作者情報"
+                      },
+                      "description": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "絵文字の説明"
+                      },
+                      "isBasedOn": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "もとになったもののURLなど"
                       }
                     },
                     "required": [
@@ -8394,7 +8540,12 @@
                       "name",
                       "category",
                       "host",
-                      "url"
+                      "url",
+                      "copyPermission",
+                      "usageInfo",
+                      "author",
+                      "description",
+                      "isBasedOn"
                     ]
                   }
                 }
@@ -8597,6 +8748,47 @@
                       },
                       "url": {
                         "type": "string"
+                      },
+                      "copyPermission": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "enum": [
+                          "allow",
+                          "deny",
+                          "conditional",
+                          null
+                        ],
+                        "description": "この絵文字を外部サーバーへコピーすることの許可"
+                      },
+                      "usageInfo": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "使用する際の説明"
+                      },
+                      "author": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "作者情報"
+                      },
+                      "description": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "絵文字の説明"
+                      },
+                      "isBasedOn": {
+                        "type": [
+                          "string",
+                          "null"
+                        ],
+                        "description": "もとになったもののURLなど"
                       }
                     },
                     "required": [
@@ -8605,7 +8797,12 @@
                       "name",
                       "category",
                       "host",
-                      "url"
+                      "url",
+                      "copyPermission",
+                      "usageInfo",
+                      "author",
+                      "description",
+                      "isBasedOn"
                     ]
                   }
                 }
@@ -9381,6 +9578,9 @@
                   },
                   "host": {
                     "type": "string"
+                  },
+                  "usageInfoReaded": {
+                    "type": "boolean"
                   }
                 },
                 "required": [
@@ -9446,6 +9646,24 @@
                       }
                     }
                   },
+                  "NOT_ALLOWED": {
+                    "value": {
+                      "error": {
+                        "message": "Copy is not allowed this emoji.",
+                        "code": "NOT_ALLOWED",
+                        "id": "1beadfcc-3882-f3c9-ee57-ded45e4741e4"
+                      }
+                    }
+                  },
+                  "SEE_USAGEINFOMATION_OR_LICENSE": {
+                    "value": {
+                      "error": {
+                        "message": "see Usage information or license.",
+                        "code": "SEE_USAGEINFOMATION_OR_LICENSE",
+                        "id": "28d9031e-ddbc-5ba3-c435-fcb5259e8408"
+                      }
+                    }
+                  },
                   "INVALID_PARAM": {
                     "value": {
                       "error": {
@@ -9612,6 +9830,47 @@
                     "items": {
                       "type": "string"
                     }
+                  },
+                  "copyPermission": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "enum": [
+                      "allow",
+                      "deny",
+                      "conditional",
+                      null
+                    ],
+                    "description": "この絵文字を外部サーバーへコピーすることの許可"
+                  },
+                  "usageInfo": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "使用する際の説明"
+                  },
+                  "author": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "作者情報"
+                  },
+                  "description": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "絵文字の説明"
+                  },
+                  "isBasedOn": {
+                    "type": [
+                      "string",
+                      "null"
+                    ],
+                    "description": "もとになったもののURLなど"
                   }
                 },
                 "anyOf": [
@@ -88957,6 +89216,42 @@
               "type": "string",
               "format": "id"
             }
+          },
+          "copyPermission": {
+            "type": [
+              "string",
+              "null"
+            ],
+            "enum": [
+              "allow",
+              "deny",
+              "conditional",
+              null
+            ]
+          },
+          "usageInfo": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "author": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "description": {
+            "type": [
+              "string",
+              "null"
+            ]
+          },
+          "isBasedOn": {
+            "type": [
+              "string",
+              "null"
+            ]
           }
         },
         "required": [
@@ -88969,7 +89264,12 @@
           "license",
           "isSensitive",
           "localOnly",
-          "roleIdsThatCanBeUsedThisEmojiAsReaction"
+          "roleIdsThatCanBeUsedThisEmojiAsReaction",
+          "copyPermission",
+          "usageInfo",
+          "author",
+          "description",
+          "isBasedOn"
         ]
       },
       "Flash": {

Get diff files from Workflow Page

@penginn-net penginn-net changed the title (Draft) Enhance(backend): Fedibird形式の絵文字情報連合に対応 (Draft) Enhance: Fedibird形式の絵文字情報連合に対応 Dec 27, 2024
@kozakura913 kozakura913 added this to the 1.3.0 milestone Dec 27, 2024
@penginn-net penginn-net marked this pull request as ready for review December 30, 2024 17:51
@penginn-net
Copy link
Collaborator Author

れでーふぉーれびゅー

@penginn-net penginn-net changed the title (Draft) Enhance: Fedibird形式の絵文字情報連合に対応 Enhance: Fedibird形式の絵文字情報連合に対応 Dec 30, 2024
Copy link
Collaborator

@kozakura913 kozakura913 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ApRenderServiceで送ってるのにApInboxServiceでは受け取らないの?
ApRenderServiceで送るならbackend/src/core/activitypub/type.tsのIApEmojiの定義も変えないとダメじゃない?

@kozakura913
Copy link
Collaborator

あとApRenderService/ApInboxServiceで扱うなら連合テストの追加も欲しい

@penginn-net
Copy link
Collaborator Author

penginn-net commented Dec 30, 2024

IApEmoji

https://github.com/yojo-art/cherrypick/pull/604/files#diff-91d29fc6895ff9205d2bc1b73f7fe153bcd097d14df1e55ecf7f1c51a7af4c69R276-R282

ApInboxService

extractApEmojiが呼ばれてるからinboxで受け取ってない?

@kozakura913
Copy link
Collaborator

辿れてなかった

@penginn-net
Copy link
Collaborator Author

なんか通った

@penginn-net
Copy link
Collaborator Author

isBasedOn追加する

@penginn-net penginn-net merged commit 30cae00 into yojo-art:develop Jan 10, 2025
35 of 36 checks passed
@penginn-net penginn-net deleted the enh-emojifederation branch January 10, 2025 13:11
@kozakura913 kozakura913 mentioned this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fedibird形式の絵文字情報連合に対応
2 participants