プロジェクト

全般

プロフィール

バグ #709

完了

抽出プラグインが既に受信済みのMessageに関しても通知を発生させてしまう

Shibafu Midorino さんが9年以上前に追加. 9年以上前に更新.

ステータス:
終了
優先度:
通常
担当者:
対象バージョン:
プラグイン名:
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 です。


ファイル

Screenshot from 2014-08-14 16_42_37.png (68.8 KB) Screenshot from 2014-08-14 16_42_37.png 対象の抽出タブの設定画面 Shibafu Midorino, 2014-08-14 16:43

他の形式にエクスポート: Atom PDF