Emoji aliases aren't working


  • Discourse touched me in a no-no place

    Continuing the discussion from Built Status: We Built a Giant Purple Dildo! Now What?:

    @PJH said:

    It has been missing for ages. I think there's a bug in that only the first alias is actually getting used - there's a few:

    :laughing:
    :satisfied:

    :hankey:
    :poop:
    :shit:

    :boom:
    :collision:

    :+1:
    :thumbsup:

    :facepunch:
    :punch:

    :runner:
    :running:

    Ok - I"m bored with that...



  • Discourse really is a piece of :shit:


  • Discourse touched me in a no-no place


  • Discourse touched me in a no-no place

    Think this may have something to do with it:

    Seems to have been when they added the different emoji sets and reorganised everything related to them back in December:

    [pjh@sofa discourse]$ git blame ./app/models/emoji.rb | grep first -B5 -A10
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  46)       e.url = "/#{base_url}/#{e.name}#{extension}"
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  47)     end
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  48)   end
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  49)
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  50)   def self.create_from_db_item(emoji)
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  51)     name = emoji["aliases"].first
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  52)     filename = "#{name}.png"
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  53)     Emoji.new.tap do |e|
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  54)       e.name = name
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  55)       e.url = "/images/emoji/#{SiteSetting.emoji_set}/#{filename}"
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  56)     end
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  57)   end
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  58)
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  59)   def self.create_for(file, name)
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  60)     extension = File.extname(file.original_filename)
    45dbdb68 (Régis Hanol      2014-12-23 01:12:26 +0100  61)     path = "#{Emoji.base_directory}/#{name}#{extension}"
    

Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.