Sha256: 08c574f3255352fc304c762eb813a8ec1cf26897767dc672f7904a88132b3e50

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

module MatrixQQ
  class QQ
    class AgreeFriend
      def initialize(dbus, _, info)
        @dbus = dbus
        @info = info
      end

      def run
        return unless @info.is_a? Hash
        @dbus.set_friend_add_request flag: @info['flag']
      end
    end # AgreeFriend

    class AgreeGroup
      def initialize(dbus, _, info)
        @dbus = dbus
        @info = info
      end

      def run
        return unless @info.is_a? Hash
        @dbus.set_group_add_request flag: @info['flag'], type: 'invite'
      end
    end # AgreeGroup

    QQ.friend_request << AgreeFriend
    QQ.invite_request << AgreeGroup
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
matrix_qq-0.5.5 lib/matrix_qq/qq/agree.rb
matrix_qq-0.5.4 lib/matrix_qq/qq/agree.rb