Fix: Incorrect thread title matching when aboning threads with emojis #1512
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
スレ一覧でスレをあぼ〜んする際、スレタイトルに絵文字が含まれていると、正しく処理されない問題を修正します。
背景:
これまで、あぼ〜ん判定に使用するスレッド情報のスレタイトルは
DBTREE::ArticleBase::get_subject()
から取得していました。このメンバー関数は、スレタイトルを表示用に変換する処理を行っていません。
一方で、NG スレタイトルに登録されるスレタイトルはスレ一覧の表示用スレタイトルを基にしており、以下の変換が適用されていました:
DBTREE::ArticleBase::get_modified_subject(true)
による置換処理MISC::to_markup()
による Pango Markup 変換この違いにより、あぼ〜ん判定時にスレッド情報のスレタイトルと NG スレタイトルが一致せず、絵文字を含むスレタイトルが正しく処理されない問題が発生していました。
修正内容:
この修正では、NG スレタイトルに登録されるスレタイトルを、表示用に変換されたものではなく、未変換のものに変更します。
これにより、あぼ〜ん判定時のスレタイトルの変換状態を統一し、処理の実行性能を維持します。
影響:
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:
DBTREE::ArticleBase::get_modified_subject(true)
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:
Closes #1511