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

getEvents is causing error #2

Open
rht opened this issue Aug 6, 2020 · 4 comments
Open

getEvents is causing error #2

rht opened this issue Aug 6, 2020 · 4 comments

Comments

@rht
Copy link

rht commented Aug 6, 2020

@ifo this is a bug reported from Matterbridge: 42wim/matterbridge#1047. The gist is that getEvents is not capturing any event from the Zulip side to be sent over to IRC / Slack side. There has been a conjecture in this comment that the cause might be zulip/zulip@86a7fdd.

@ifo
Copy link
Owner

ifo commented Aug 9, 2020

Hey thanks! Yeah, I recently started fixing a bot of mine that uses this and found out that getEvents didn't work due to me passing the wrong last event id. Turns out I'd been doing it wrong the entire time! I'd thought the last event id should be the largest ID of the events you'd seen, and assumed that was something like the message id, rather than the actual id of the event being passed back. I fixed it with 684aca9, and also fixed reactions, which were using an outdated api endpoint.

Updating matterbridge's go.mod to require github.com/ifo/gozulipbot v0.0.0-20200725193743-f965bc443509 should fix things.

Thanks for reporting this and let me know if that works!

@ifo
Copy link
Owner

ifo commented Aug 10, 2020

Actually, scratch that. I found some bad bugs with EventsChan, EventsCallback and ParseEventMessages (essentially they'll fail as soon as they get a heartbeat message). I fixed those and tagged the first module version of this at v0.0.1.

@rht
Copy link
Author

rht commented Aug 10, 2020

Great, I will test on Matterbridge soon.

@rht
Copy link
Author

rht commented Aug 10, 2020

I just tested by creating a bridge (via Matterbridge) between irc.freenode.net of #python-mypy and chat.zulip.org of #test-here. The message from freenode gets relayed to Zulip, but still not the other way around. Maybe I will ask the Matterbridge author to test it instead. There are several patches to ifo/gozulipbot done by Matterbridge, and I patched the code manually.

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

2 participants