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

Fix: Incorrect thread title matching when aboning threads with emojis #1512

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Feb 1, 2025

スレ一覧でスレをあぼ〜んする際、スレタイトルに絵文字が含まれていると、正しく処理されない問題を修正します。

背景:

これまで、あぼ〜ん判定に使用するスレッド情報のスレタイトルはDBTREE::ArticleBase::get_subject() から取得していました。
このメンバー関数は、スレタイトルを表示用に変換する処理を行っていません。

一方で、NG スレタイトルに登録されるスレタイトルはスレ一覧の表示用スレタイトルを基にしており、以下の変換が適用されていました:

  • DBTREE::ArticleBase::get_modified_subject(true) による置換処理
  • MISC::to_markup() による Pango Markup 変換

この違いにより、あぼ〜ん判定時にスレッド情報のスレタイトルと NG スレタイトルが一致せず、絵文字を含むスレタイトルが正しく処理されない問題が発生していました。

修正内容:

この修正では、NG スレタイトルに登録されるスレタイトルを、表示用に変換されたものではなく、未変換のものに変更します。
これにより、あぼ〜ん判定時のスレタイトルの変換状態を統一し、処理の実行性能を維持します。

影響:

  • NG スレタイトルに登録されるスレタイトルが未変換のものになるため、手動で編集する際の可読性が低下する可能性があります。
  • ただし、スレあぼ〜んの操作は主に GUI を通じて行われるため、実際の運用では問題にならないと考えられます。

Fixes an issue where aboning a thread from the thread list does not work correctly if the thread title contains emojis.

Background:

Previously, the thread title used for abone judgment was obtained from DBTREE::ArticleBase::get_subject(), which does not apply any display transformations.

On the other hand, the thread title registered in the NG thread title list was derived from the display title in the thread list, which had the following transformations applied:

  • Substitution processing via DBTREE::ArticleBase::get_modified_subject(true)
  • Conversion to Pango Markup via MISC::to_markup()

Due to this inconsistency, the abone judgment failed when comparing the NG thread title with the actual thread title, causing the issue where threads with emojis were not properly aboned.

Fix Details:

This fix changes the NG thread title registration process to store unprocessed thread titles instead of display-transformed ones. This ensures that both the thread title used in abone judgment and the NG thread title remain in the same transformation state, improving processing efficiency.

Impact:

  • NG thread titles will now be stored in an unprocessed state, which may reduce readability when manually editing the NG list.
  • However, since thread aboning is typically performed through the GUI, this change is not expected to cause usability issues.

Closes #1511

スレ一覧でスレをあぼ〜んする際、スレタイトルに絵文字が含まれていると、
正しく処理されない問題を修正します。

背景:

これまで、あぼ〜ん判定に使用するスレッド情報のスレタイトルは
`DBTREE::ArticleBase::get_subject()` から取得していました。
このメンバー関数は、スレタイトルを表示用に変換する処理を行っていません。

一方で、NG スレタイトルに登録されるスレタイトルはスレ一覧の
表示用スレタイトルを基にしており、以下の変換が適用されていました:

- `DBTREE::ArticleBase::get_modified_subject(true)` による置換処理
- `MISC::to_markup()` による Pango Markup 変換

この違いにより、あぼ〜ん判定時にスレッド情報のスレタイトルと
NG スレタイトルが一致せず、絵文字を含むスレタイトルが
正しく処理されない問題が発生していました。

修正内容:

この修正では、NG スレタイトルに登録されるスレタイトルを、
表示用に変換されたものではなく、未変換のものに変更します。
これにより、あぼ〜ん判定時のスレタイトルの変換状態を統一し、
処理の実行性能を維持します。

影響:

- NG スレタイトルに登録されるスレタイトルが未変換のものになるため、
  手動で編集する際の可読性が低下する可能性があります。
- ただし、スレあぼ〜んの操作は主に GUI を通じて行われるため、
  実際の運用では問題にならないと考えられます。

Fixes an issue where aboning a thread from the thread list does not
work correctly if the thread title contains emojis.

Background:

Previously, the thread title used for abone judgment was obtained
from `DBTREE::ArticleBase::get_subject()`, which does not apply any
display transformations.

On the other hand, the thread title registered in the NG thread title
list was derived from the display title in the thread list, which had
the following transformations applied:

- Substitution processing via `DBTREE::ArticleBase::get_modified_subject(true)`
- Conversion to Pango Markup via `MISC::to_markup()`

Due to this inconsistency, the abone judgment failed when comparing
the NG thread title with the actual thread title, causing the issue
where threads with emojis were not properly aboned.

Fix Details:

This fix changes the NG thread title registration process to store
unprocessed thread titles instead of display-transformed ones.
This ensures that both the thread title used in abone judgment and
the NG thread title remain in the same transformation state,
improving processing efficiency.

Impact:

- NG thread titles will now be stored in an unprocessed state, which
  may reduce readability when manually editing the NG list.
- However, since thread aboning is typically performed through the
  GUI, this change is not expected to cause usability issues.
@ma8ma ma8ma added the bug バグの追跡 label Feb 1, 2025
@ma8ma ma8ma merged commit b13ee5e into master Feb 1, 2025
21 checks passed
@ma8ma ma8ma deleted the fix-incorrect-thread-title-matching-when-aboning-threads-with-emojis branch February 1, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug バグの追跡
Projects
Development

Successfully merging this pull request may close these issues.

スレタイトルに絵文字があるとスレあぼ〜ん機能が正常に動作しない
1 participant