Skip to content

Commit

Permalink
Merge branch 'vmimi-relay-timeline/merge-generic' into vmimi-relay-ti…
Browse files Browse the repository at this point in the history
…meline/generic
  • Loading branch information
anatawa12 committed Sep 29, 2024
2 parents d163b91 + 43d7ddb commit 23df35e
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/vrtl-docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Push VRTL Misskey Docker Image

on:
push:
tags:
- 'v*-vrtl.*'

env:
DOCKER_REGISTRY_NAME: ghcr.io
DOCKER_IMAGE_NAME: anatawa12/vrtl-misskey

jobs:
build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Docker hub
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY_NAME }}
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY_NAME }}/${{ env.DOCKER_IMAGE_NAME }}

- name: Build & Push
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: ${{ env.DOCKER_REGISTRY_NAME }}/${{ env.DOCKER_IMAGE_NAME }}:latest
build-args: BUILDKIT_INLINE_CACHE=1
5 changes: 5 additions & 0 deletions CHANGELOG-VRTL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ VRTLのブランチで行われた変更点をまとめています
<!-- VV Please add changelog here VV -->
- fix(frontend): VRTL VSTLの名前が表示されないところがある問題 (anatawa12#97) - 2024/08/07
- fic(frontend): VRTL VSTLでリプライのトグルが表示されない問題 (anatawa12#92) - 2024/08/04

--- 2024.7.0-vrtl.1 released at this time ---

--- 2024.5.0-vrtl.2 released at this time ---

- chore(backend): VRTL参加サーバーの取得に失敗したときのリトライの間隔を短く
- feat: VRTL/VSTLに連合なし投稿を含めるかを選択可能に
- もともとのVRTL/VSTLでは連合なし投稿が常に含まれていましたが、正しくVRTL/VSTLのノートを表現するために含めないようにできるようになりました
Expand Down
128 changes: 128 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,131 @@
# Anatawa12's fork of Misskey

This is anatawa12's fork of Misskey.

This fork is used for several purposes:

- The repository for [vmimi-relay timeline] extension development. I'm the maintainer of the [vmimi-relay timeline].
- The repository for writing pull-requests to the vmimi relay users. I'm usually sending pull requests to the vmimi relay users after each updates.
- The repository for writing pull-requests to the upstream repository. I'm one of the contributors of the upstream repository.
- The repository for writing pull-requests to the [misskey.niri.la]. I'm one of the maintainers of the [misskey.niri.la].

This branch is the branch for releasing the Vmimi Relay Timeline extension.

## Vmimi Relay Timeline

The Vmimi Relay Timeline is additional timelines for Misskey servers who belong to the [Virtual Kemomimi Relay].
This extension adds two timelines: Vmimi Relay Timeline (VRTL) and Vmimi Social Timeline (VSTL).

ぶいみみリレータイムラインは[ぶいみみリレー][Virtual Kemomimi Relay]に参加しているサーバー向けのmisskeyの拡張タイムラインです。
この拡張はふたつのタイムラインを追加します: ぶいみみリレータイムライン (VRTL) とぶいみみソーシャルタイムライン (VSTL) です。

### Vmimi Relay Timeline (VRTL)

The Vmimi Relay Timeline (VRTL) is the timeline that shows the posts from the Virtual Kemomimi Relay users.
This timeline is designed to be similar to the Local Timeline,
but it shows the posts from the Virtual Kemomimi Relay users.

ぶいみみリレータイムライン (VRTL) はぶいみみリレーに参加しているユーザーの投稿を表示するタイムラインです。
このタイムラインはローカルタイムラインに似ていますが、ぶいみみリレーに参加しているユーザーの投稿を表示します。

### Vmimi Social Timeline (VSTL)

The Vmimi Social Timeline (VSTL) is the timeline that shows the posts from
the Virtual Kemomimi Relay users and the users you are following.
In other words, this timeline is the combination of the VRTL and the Home Timeline.
This timeline is designed to be similar to the Social Timeline,
but it shows the posts from the Virtual Kemomimi Relay users instead of the Local Timeline.

ぶいみみソーシャルタイムライン (VSTL) はぶいみみリレーに参加しているユーザーとフォローしているユーザーの投稿を表示するタイムラインです。
つまり、このタイムラインはVRTLとホームタイムラインの組み合わせです。
このタイムラインはソーシャルタイムラインに似ていますが、ローカルタイムラインの代わりにぶいみみリレーに参加しているユーザーの投稿を表示します。

### How to use the Vmimi Relay Timeline

First, this extension is designed for servers who joined the [Virtual Kemomimi Relay]
so you have to join the [Virtual Kemomimi Relay] to use this extension.

After that, you have two ways to use the Vmimi Relay Timeline:
- Use releases of the misskey docker image if you're using official docker image.
The image is designed to be a drop-in replacement of the official image.
The image name is [`ghcr.io/anatawa12/vrtl-misskey:latest`].
- Merge the extension branch to your fork and build the image by yourself.
You can merge the [`vmimi-relay-timeline/generic`] branch to your fork.
If you ask me, I'll create a pull request to your fork. Feel free to ask me.

はじめに、この拡張は[ぶいみみリレー][Virtual Kemomimi Relay]に参加しているサーバー向けに設計されているため、この拡張を使用するには[ぶいみみリレー][Virtual Kemomimi Relay]に参加する必要があります。

その後、ぶいみみリレータイムラインを使用する方法はふたつあります:
- 公式のdockerイメージを使用している場合は、VRTLのdockerイメージを使用してください。
のイメージは公式イメージの代わりとして使用できます。
イメージ名は [`ghcr.io/anatawa12/vrtl-misskey:latest`] です。
- このブランチをあなたのフォークにマージして、自分でイメージをビルドしてください。
[`vmimi-relay-timeline/generic`] ブランチをあなたのフォークにマージすることで、この拡張を使用できます。
必要であれば、あなたのフォークにプルリクエストを作成します。お気軽にお尋ねください。

### Notes for Third-party Client Developers

Here are the technical notes for third-party misskey client developers.

サードパーティ Misskey クライアント向けの技術的な情報です

#### Detecting Vmimi Relay Timeline

There is `vmimiRelayTimelineImplemented` property on `metadata` object of `nodeinfo`.
If it's true, your client can assume that the VRTL is implemented for the sever.

`nodeinfo``metadata`オブジェクトに`vmimiRelayTimelineImplemented`プロパティがあります。
この値が true であれば、VRTLがそのサーバーにて実装されてると考えて問題ありません

#### Endpoints and Channels of Vmimi Relay Timeline

The fetch note endpoint for VRTL and VSTL are `notes/vmimi-relay-timeline` and `notes/vmimi-relay-hybrid-timeline`,
and the channel name for them are `vmimiRelayTimeline` and `vmimiRelayHybridTimeline`.

Those endpoints and channels have almost same options as LTL / STL but they have one extra option specific to VRTL/VSTL.
The `withLocalOnly` flag (true by default) indicates if the timeline should include local only (non-federated) notes from server (local) timeline.

For more details, see `misskey-js`.

VRTLとVSTLのfetchエンドポイントはそれぞれ `notes/vmimi-relay-timeline``notes/vmimi-relay-hybrid-timeline`で、
チャンネルは `vmimiRelayTimeline``vmimiRelayHybridTimeline` です。

これらのエンドポイントとチャンネルは LTL/STL とほぼ同じオプションを持っていますが、 VRTL/VSTL に固有オプションが一つあります。
`withLocalOnly` (デフォルトtrue) はタイムラインにローカルのみ(連合なし)ノートがタイムラインに含まれるかどうかを示します。

### Branches related to Vmimi Relay Timeline

- [`vmimi-relay-timeline/generic`]:
The branch for the Vmimi Relay Timeline extension development.
All changes to the Vmimi Relay Timeline extension will be merged to this branch.
This branch should be based on the latest official release of Misskey.
This branch does not include any changes other than the Vmimi Relay Timeline extension itself.
- [`vmimi-relay-timeline/releases`]:
The branch for releasing the Vmimi Relay Timeline extension.
This branch includes the changes for `package.json` and changes to the repository link.
- `vmimi-relay-timeline/forks/nirila`, `vmimi-relay-timeline/forks/buiso` and other branches:
Those branches are the branches for sending pull requests to each fork-based server.
Those branches are not permanent; they will be deleted after each pull request is merged.

### How the Vmimi Relay Timeline works

The Vmimi Relay Timeline is implemented as a server-whitelisted timeline.

The Vmimi Relay provides the API endpoint to get the list of joined servers.
The Vmimi Relay Timeline extension fetches the list of joined servers from the Vmimi Relay
and filters the received / created notes by the list.
For implementation simplicity, the Vmimi Relay Timeline includes all public notes of the local server including
non-federated notes, but this behavior may change in the future.

[Virtual Kemomimi Relay]: https://relay.virtualkemomimi.net/
[misskey.niri.la]: https://github.com/niri-la/misskey.niri.la/
[vmimi-relay timeline]: #vmimi-relay-timeline
[`vmimi-relay-timeline/generic`]: https://github.com/anatawa12/misskey/tree/vmimi-relay-timeline/generic
[`vmimi-relay-timeline/releases`]: https://github.com/anatawa12/misskey/tree/vmimi-relay-timeline/releases
[`ghcr.io/anatawa12/vrtl-misskey:latest`]: https://github.com/anatawa12/misskey/pkgs/container/vrtl-misskey

---

<div align="center">
<a href="https://misskey-hub.net">
<img src="./assets/title_float.svg" alt="Misskey logo" style="border-radius:50%" width="300"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class RepositoryUrlVmimiRelayTimeline1716641282089 {
name = 'RepositoryUrlVmimiRelayTimeline1716641282089'

async up(queryRunner) {
await queryRunner.query(`UPDATE "meta" SET "repositoryUrl" = 'https://github.com/anatawa12/misskey/tree/vmimi-relay-timeline-releases?tab=readme-ov-file#vmimi-relay-timeline'`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "repositoryUrl" SET DEFAULT 'https://github.com/anatawa12/misskey/tree/vmimi-relay-timeline-releases?tab=readme-ov-file#vmimi-relay-timeline'`);
}

async down(queryRunner) {
// no valid down migration for repositoryUrl value
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "repositoryUrl" SET DEFAULT 'https://github.com/misskey-dev/misskey'`);
}
}
2 changes: 1 addition & 1 deletion packages/backend/src/models/Meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export class MiMeta {

@Column('varchar', {
length: 1024,
default: 'https://github.com/misskey-dev/misskey',
default: 'https://github.com/anatawa12/misskey/tree/vmimi-relay-timeline-releases?tab=readme-ov-file#vmimi-relay-timeline',
nullable: true,
})
public repositoryUrl: string | null;
Expand Down

0 comments on commit 23df35e

Please sign in to comment.