bitlbee / bitlbee-facebook

Facebook protocol plugin for BitlBee
GNU General Public License v2.0
281 stars 49 forks source link

Feature request: Ascii thumbs up #72

Open dal00 opened 8 years ago

dal00 commented 8 years ago

An option to show ascii thumbs up instead of the facebook thumbs up image If this url is static It should be straight forward.

https://scontent.xx.fbcdn.net/hphotos-xfa1/t39.1997-6/851557_369239266556155_759568595_n.png?_nc_ad=z-m

And use one of these: http://textart4u.blogspot.se/2012/04/thumbs-up-and-big-like-text-art.html

saironiq commented 8 years ago

How about a Unicode thumbs up character? http://www.fileformat.info/info/unicode/char/1f44d/index.htm

zopieux commented 8 years ago

I would also prefer a single, simple and clear thumbs-up emoji such as :+1: rather than a fuckload of lines. Thumb size could be displayed next to it, eg: :+1:(7/9)

AdrianKoshka commented 8 years ago

I agree with @saironiq and @Zopieux, while the thought of an ascii thumbs up might be novel the first few times, it'd get annoying...just my opinion.

andreimarcu commented 8 years ago

(y)

dequis commented 8 years ago

Some relevant notes:

  1. The "thumbs up" thing is a sticker, identified by a sticker ID. All we get is that, a number like 369239383222810, no indication that it's a thumbs up or its size.
  2. We do a FetchStickersWithPreviewsQuery request to get more details about it, and we get this:

    {
       "369239383222810": {
           "__type__": {
               "name": "Sticker"
           },
           "id": "369239383222810",
           "pack": {
               "id": "227877430692340"
           },
           "thread_image": {
               "uri": "https://scontent.xx.fbcdn.net/t39.1997-6/p128x128/851582_369239386556143_1497813874_n.png?_nc_ad=z-m"
           },
           "animated_image": null,
           "preview_image": {
               "uri": "https://scontent.xx.fbcdn.net/t39.1997-6/p200x200/851582_369239386556143_1497813874_n.png?_nc_ad=z-m"
           }
       }
    }
  3. Each size has a different sticker ID. They are 369239263222822, 369239343222814, 369239383222810 for small/medium/large.
  4. All of those belong to the pack with ID 227877430692340, but I don't know if other stickers exist in that pack.
  5. This can be changed with the "emoji" option in the chat details in orca, which makes it use proper unicode emoji instead of this sticker pack. When this is changed, a deltaAdminTextMessage is sent with "type":"change_thread_icon","untypedData":{"thread_icon":"✌"}
  6. The messages sent when one of these non-thumbs-up big emoji are used are much more straightforward, with no stickers:

    {
       "deltas": [
           {
               "deltaNewMessage": {
                   "messageMetadata": {
                       "threadKey": {
                           "otherUserFbId": "[...]"
                       },
                       "messageId": "mid.[...]",
                       "offlineThreadingId": "[...]",
                       "actorFbId": "[...]",
                       "timestamp": 1462646531521,
                       "tags": [
                           "source:chat:orca",
                           "hot_emoji_size:small"
                       ]
                   },
                   "body": "✌",
                   "attachments": []
               }
           }
       ],
       "firstDeltaSeqId": 20364,
       "lastIssuedSeqId": 20364
    }
  7. I had doubts about using the unicode character for thumbs up, since some people might have trouble displaying them, so I considered making it configurable. But given how the android client might send it anyway, i'll go with just the unicode character, which simplifies things.
IamCarbonMan commented 7 years ago

+1. The ability to send stickers is currently one of the few things keeping me from using Bitlbee exclusively for my Facebook messages. When I want to send a sticker I have to log in to the site itself. I would be content to have to find the URL or ID of the sticker myself, just as long as a valid sticker URL (or something like /sticker <id>) actually translated to a sticker being sent. I'm perfectly happy with receiving stickers in the form of an image URL because I can preview that image using a local script (which I already use for URL previews anyway). But there's currently no way to send a sticker.

dequis commented 7 years ago

@IamCarbonMan this ticket isn't about that. this is about turning incoming :+1: stickers into emoji or something other than the URL

varazir commented 7 years ago

@dequis Sweet, I'm using trigger to "hide" images and send them to my phone. Now I can create one for just thumbs up. imo +1 is the best way to show them or as you say configur your own

dequis commented 7 years ago

I don't have any scripts for this, but with irssi and trigger.pl you could do something like

/trigger add -publics -privmsgs -pattern "<url to replace>" -replace "<replacement text>"
varazir commented 7 years ago

I have similar trigger. But was there a fixed ID list for thumbs up? For now I'm pushing all photo links also to my phone so I can see the photo in a notification