fb-messenger-cli icon indicating copy to clipboard operation
fb-messenger-cli copied to clipboard

Add capability to read custom nicknames from new thread data.

Open marcel-valdez opened this issue 6 years ago • 4 comments

Fix the custom nickname functionality.

Essentially all I added was the capability to read the custom nickname data from the new thread object structure.

I also made it so that when the "use custom nickname" option is set, your user now says 'Me' instead of your actual first name and last name.

marcel-valdez avatar Feb 13 '18 09:02 marcel-valdez

@SamBergeron can you please review? Thanks.

marcel-valdez avatar Feb 13 '18 09:02 marcel-valdez

@Alex-Rose you could review as well :+1: just want this in :smile:

marcel-valdez avatar Feb 13 '18 09:02 marcel-valdez

Just checked this. Here's a couple of things though. You don't actually need to set the nickname to "Me:" for the current user if he has a set nickname, your own nickname should be in the customization subset, this actually make everything easier. There's also a small issue. This saves the nicknames based on individual IDs so if you have multiple nicknames in different conversations, it'll show that name in all the conversations. Ex: Jack is name "foo" in a group chat, if you have a 1-on-1 chat with Jack it'll now show up as "foo"

SamBergeron avatar Feb 15 '18 15:02 SamBergeron

You're right... and it is quite doable, I'll add the required code to show what you suggest. Just need to use a map for the nicknames where the key is the fb_id + thread_id: nickname

marcel-valdez avatar Feb 22 '18 08:02 marcel-valdez