Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chats not refreshing automatically #220

Open
blandre opened this issue Nov 21, 2019 · 13 comments
Open

Chats not refreshing automatically #220

blandre opened this issue Nov 21, 2019 · 13 comments

Comments

@blandre
Copy link

blandre commented Nov 21, 2019

Whenever I receive a new message, it doesn't automatically show, unless I manually refresh. The same happens when I send new messages, the '>' indicator doesn't show after I send the first time. Again, refreshing manually seems to work.

@Horites
Copy link

Horites commented Nov 24, 2019

Im having the same exact problem

@j6k4m8
Copy link

j6k4m8 commented Dec 16, 2019

I am running into the same issue. Some important diagnostics:

  • messages still do send upon hitting enter
  • new messages do not render in the thread

(Hope @Horites and @blandre will let me know if their experiences differ from this)

@wgehalo
Copy link

wgehalo commented Dec 17, 2019

Same issue here.

Also might be worth noting Messer, a similar project, is having a similar issue. I suspect facebook updated their API which is causing this issue.

@Horites
Copy link

Horites commented Dec 18, 2019

Hello @j6k4m8
Yes, it seems like Im having the exact same problem as you are.
I do belive @wgehalo would be correct on the API issue.

@Toz3wm
Copy link

Toz3wm commented Dec 24, 2019

Same problem here.
Anyone aware of a similar project that fixed this problem ?

@michondr
Copy link

joining you guys. discovered cli clients yeasterday and still didn't manage to make usable this one nor messer 😄.

also, this happens

> /search adama
/usr/lib/node_modules/fb-messenger-cli/lib/search.js:49
            return friend.name.toLowerCase().indexOf(searchString.toLowerCase()) !== -1;
                               ^

TypeError: Cannot read property 'toLowerCase' of undefined
    at /usr/lib/node_modules/fb-messenger-cli/lib/search.js:49:32
    at Array.filter (<anonymous>)
    at Search.filterFriends (/usr/lib/node_modules/fb-messenger-cli/lib/search.js:48:38)
    at /usr/lib/node_modules/fb-messenger-cli/lib/search.js:42:18

@j6k4m8
Copy link

j6k4m8 commented Dec 25, 2019

@michondr your second bug looks like it's solved here:
#193

  • Delete the .kryptonite file
  • Make sure you're on the latest node versions

@B-greg
Copy link

B-greg commented Jan 6, 2020

I'm having the same problem. Did they have any progress on this issue?

@gcantieni
Copy link

gcantieni commented Jan 13, 2020

yeah i've just taken to typing /r after every series of messages, not quite ideal but...beats opening the browser?

@j6k4m8
Copy link

j6k4m8 commented Jan 13, 2020 via email

@blandre
Copy link
Author

blandre commented Jan 14, 2020

I tried reinstalling and messed something up, so I'm currently relying on a docker version that is not even loading conversation lists
However, I remember being able to use /r to refresh conversations and it worked..

Just tested it, and typing a /r after sending a message remedies the issue. However, it does not seem to refresh the messages after receiving a response.

@gregoryfenton
Copy link

Typing in the message, pressing Enter
then typing /r
works for me but typing /r constantly to check is a bit of a pain

@j6k4m8
Copy link

j6k4m8 commented Mar 25, 2020

To help start to centralize this:

It looks like this code is responsible for handling the explicit refresh command with /refresh or /r:

case '/refresh':
if (action === 1) {
interactive.initializeConversationViewFromFbid(this.currentConversationId);
} else {
interactive.handleCommands("/back");
}
break;

Might need some other eyes on this, but I believe this code is where the new incoming message triggers a thread refresh:

emitter.emit(listener, current_userId, (data) => {
action = data.action;
currentThreadCount = data.threadCount;
rlInterface.prompt(true);

Actual refresh here:

interactive.printThread();

I can spend more time on this during the weekend, but hopefully this helps us start narrowing down where the bug lives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants