提案 #1323 » 0001-Tweet-URL.patch
core/plugin/twitter/twitter.rb | ||
---|---|---|
402 | 402 |
extended_entities = (tweet[:extended_entities][:media] rescue nil) |
403 | 403 |
if extended_entities |
404 | 404 |
space = text_note(description: ' ') |
405 |
newline = text_note(description: "\n") |
|
405 | 406 |
result = extended_entities.map{ |media| |
406 | 407 |
case media[:type] |
407 | 408 |
when 'photo' |
... | ... | |
434 | 435 |
description: "#{media[:display_url]} (GIF)", |
435 | 436 |
uri: variant[:url]) |
436 | 437 |
end |
437 |
}.flat_map{|media| [media, space] } |
|
438 |
}.flat_map{|media| [newline, media, space] }
|
|
438 | 439 |
result.pop |
439 | 440 |
result |
440 | 441 |
else |