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

投票するときに投稿として扱わないように #4425

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

syuilo
Copy link
Member

@syuilo syuilo commented Mar 6, 2019

アンケートに投票するとき、投稿としてアクティビティを送信するのではなく(見かけ上)投票アクティビティとして送信するようにしています
ただMastodonは投票を投稿として受信するようなのでアクティビティタイプはNoteのままで、AP上は投稿アクティビティのようにしています
「タイムラインに投票が流れる」問題も修正されます

まだ動作未確認です。あとIDをどうするか(適当にランダムなものにして大丈夫なのかどうかが分かってない)

@syuilo syuilo mentioned this pull request Mar 6, 2019
1 task
@mei23
Copy link
Contributor

mei23 commented Mar 6, 2019

あとIDをどうするか(適当にランダムなものにして大丈夫なのかどうかが分かってない)

IDは適用で大丈夫です (DM扱いで送られるので外からpullされて存在を確認されることもない)

ちなみにMastodonはこんな感じでvoteを送ってくるみたいです。
(31はおそらくなんかのテーブルのレコードのindexか何かと思われる)

{
  "id": "https://mastodon/users/a#votes/31",
  "type": "Note",
  "name": "あ",
  "attributedTo": "https://mastodon/users/a",
  "inReplyTo": "https://misskey/notes/5c7f81b9ccd39309f34b4893",
  "to": "https://misskey/users/5bedba2833accf31225e3146"
}

@syuilo
Copy link
Member Author

syuilo commented Mar 6, 2019

あとIDをどうするか(適当にランダムなものにして大丈夫なのかどうかが分かってない)

IDは適用で大丈夫です (DM扱いで送られるので外からpullされて存在を確認されることもない)

ちなみにMastodonはこんな感じでvoteを送ってくるみたいです。
(31はおそらくvotesテーブルのレコードのindexか何かと思われる)

{
  "id": "https://mastodon/users/a#votes/31",
  "type": "Note",
  "name": "あ",
  "attributedTo": "https://mastodon/users/a",
  "inReplyTo": "https://misskey/notes/5c7f81b9ccd39309f34b4893",
  "to": "https://misskey/users/5bedba2833accf31225e3146"
}

ありがとうございます🙏
Mastodonが送ってくる形式に合わせれば大丈夫そうですね

@syuilo
Copy link
Member Author

syuilo commented Mar 6, 2019

形式をMastodonと同じにしました。

Copy link
Member

@acid-chicken acid-chicken left a comment

Choose a reason for hiding this comment

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

:shipit:

@syuilo syuilo merged commit 6ac5abc into poll Mar 6, 2019
@syuilo
Copy link
Member Author

syuilo commented Mar 6, 2019

ありがとうございました。

@syuilo syuilo deleted the better-vote-design branch March 6, 2019 09:48
syuilo pushed a commit that referenced this pull request Mar 6, 2019
* Start working

* WIP: Enhance poll

* Fix bug

* Use `name` in voting note
refs: https://github.com/syuilo/misskey/issues/4407#issuecomment-469057296

* Fix style

* Refactor
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>

* WIP: Update poll editor

* Fix bug

* Fix bug
refs: https://github.com/syuilo/misskey/pull/4409#discussion_r

* Fix typo

* Better design

* Beautify poll editor

* Fix UI

* Fix bug
refs: https://github.com/syuilo/misskey/pull/4409#discussion_r262217524

* Add debug logging

* Fix bug

* Log deliver

* fix vote

* Update ap/show
refs: https://github.com/syuilo/misskey/pull/4409#issuecomment-469652386

* Update poll view

* Maybe done

* Add tests

* Fix path

* Fix test

* Fix test

* Fix test

* Fix expired check on AP

* Update note.ts

* Squashed commit of the following:

commit d9a4bea
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 05:16:14 2019 +0900

    tune

commit 83ff421
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 05:01:14 2019 +0900

    fallback

commit 0b566af
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 04:40:12 2019 +0900

    Note

commit cc0296d
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 04:33:58 2019 +0900

    createで送る

* Squashed commit of the following:

commit ae696b1
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 06:11:17 2019 +0900

    fix

commit b735e35
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 06:08:33 2019 +0900

    messge

commit d9a4bea
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 05:16:14 2019 +0900

    tune

commit 83ff421
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 05:01:14 2019 +0900

    fallback

commit 0b566af
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 04:40:12 2019 +0900

    Note

commit cc0296d
Author: mei23 <m@m544.net>
Date:   Wed Mar 6 04:33:58 2019 +0900

    createで送る

* Fix typo

* Update vote.ts

* Update vote.ts

* Update poll-editor.vue

* Update tslint.json

* Fix layout

* Add note

* Fix bug

* Rename text key

* 投票するときに投稿として扱わないように (#4425)

* wip

* 形式をMastodonと合わせた

* Bye something

* Use - instead of ~

* Redundancy

* Yes!

* Refactor

* Use moment instead of Date

* Fix indent

* Refactor

if (votes.length)
は必要なさそう

* Clean up

* Bye Date

* Clean

* Fix timer is not displayed

* Fix リモートから無期限pollにvoteできない

* Fix vote actor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants