module Plugin::DirectMessage

DM用のリストビュー

最後にやりとりしたDMの日時でソートする機能のついたUserlist

Public Instance Methods

extract_slug_for(user) click to toggle source
# File core/plugin/direct_message/direct_message.rb, line 37
def extract_slug_for(user)
  "direct_message-#{user.id}".to_sym
end
rewind() click to toggle source
# File core/plugin/direct_message/direct_message.rb, line 64
def rewind
  service = Service.primary
  if service
    Deferred.when(
        service.direct_messages(cache: :keep),
        service.sent_direct_messages(cache: :keep)
    ).next{ |dm, sent|
      result = dm + sent
      Plugin.call(:direct_messages, service, result) unless result.empty?
    }.trap{ |e|
      error e
      raise e
    }.terminate end end
timeline_name_for(user) click to toggle source
# File core/plugin/direct_message/direct_message.rb, line 56
def timeline_name_for(user)
  :"direct_messages_from_#{user.idname}"
end
userlist() click to toggle source
# File core/plugin/direct_message/direct_message.rb, line 8
def userlist
  @userlist ||= UserList.new end