The code powering m.abunchtell.com https://m.abunchtell.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

19 righe
564 B

  1. class PostStatusService < BaseService
  2. # Post a text status update, fetch and notify remote users mentioned
  3. # @param [Account] account Account from which to post
  4. # @param [String] text Message
  5. # @param [Status] in_reply_to Optional status to reply to
  6. # @return [Status]
  7. def call(account, text, in_reply_to = nil)
  8. status = account.statuses.create!(text: text, thread: in_reply_to)
  9. process_mentions_service.(status)
  10. status
  11. end
  12. private
  13. def process_mentions_service
  14. @process_mentions_service ||= ProcessMentionsService.new
  15. end
  16. end