操作
バグ #709
完了抽出プラグインが既に受信済みのMessageに関しても通知を発生させてしまう
プラグイン名:
extract
ブランチ:
クラッシュする:
説明
独自のデータソースを定義するプラグインから、抽出プラグインの extract_receive_message に向かってMessagesを送る際の事象です。
既に受信され抽出タブのTimelineに存在しているMessageに関しても、タブの設定に基づいた通知が何度も発生してしまいます。
再現を行うために使用したプラグインは以下の通りで、対象のタブでは通知サウンドとポップアップを有効にしていました。
# -*- coding: utf-8 -*-
Plugin.create(:sample_source) do
filter_extract_datasources do |datasources|
datasources[:sample_source] = "Sample Source"
[datasources]
end
@time = Time.now
def throw_sample
Reserver.new(10) do
user = User.new({
id: 1,
idname: "sample_source",
name: "Sample Source",
detail: "",
nickname: "Sample Source",
profile_image_url: "https://pbs.twimg.com/profile_images/496591590844944385/n1C_IWEH.png",
url: ""
})
message = Message.new({
id: 10000,
message: "sample",
user: user,
source: "sample_source",
created: @time,
})
msgs = Messages.new
msgs << message
Plugin.call(:extract_receive_message, :sample_source, msgs)
throw_sample()
end
end
throw_sample()
end
環境は Arch Linux x86-64, ruby 2.1.2p95, mikutter 3.0.4 です。
ファイル
toshi_a 初音 さんが約11年前に更新
- ステータス を 新規 から 実装待ち に変更
- 担当者 を toshi_a 初音 にセット
- 対象バージョン を 3.0.0 から 3.1.0 に変更
恒久的に覚えておくのはどうかと思うので、タイムラインオブジェクトにあるツイートが既に含まれているかどうかを問い合わせる仕組みを付けたいと思います。
TimeLineにMessageが含まれている間は、通知が再発生しないという挙動になるかと。
操作