pnut-bridge user fails to respond to new chat #16

Closed
opened 2017-07-19 03:48:27 +00:00 by thrrgilag · 7 comments
thrrgilag commented 2017-07-19 03:48:27 +00:00 (Migrated from gitlab.com)

created by: cmdrmonkey

Created by @thrrgilag:monkeystew.net

the bridge bot throws a keyerror in on_message

<em>created by: cmdrmonkey</em> Created by ``@thrrgilag:monkeystew.net`` the bridge bot throws a keyerror in on_message
thrrgilag commented 2018-01-10 02:28:42 +00:00 (Migrated from gitlab.com)

created by: thrrgilag

Example from a test

  File "/home/nuttybot/pnut-matrix/appservice.py", line 41, in on_receive_events
    cmdbot.on_message(event)
  File "/home/nuttybot/pnut-matrix/bot.py", line 48, in on_message
    room = rooms[event['room_id']]
KeyError: '!FqQhNfrSWThvDQGbMV:monkeystew.net'

By Morgan McMillian on 2018-07-04T02:59:41 (imported from GitLab project)

<em>created by: thrrgilag</em> Example from a test ``` File "/home/nuttybot/pnut-matrix/appservice.py", line 41, in on_receive_events cmdbot.on_message(event) File "/home/nuttybot/pnut-matrix/bot.py", line 48, in on_message room = rooms[event['room_id']] KeyError: '!FqQhNfrSWThvDQGbMV:monkeystew.net' ``` *By Morgan McMillian on 2018-07-04T02:59:41 (imported from GitLab project)*
thrrgilag commented 2018-01-10 02:30:18 +00:00 (Migrated from gitlab.com)

created by: thrrgilag

Subsequent to the KeyError the appservice maybe responding with 500 causing the server to back-off of requests thereby breaking the bridge until the bridge is restarted.

By Morgan McMillian on 2018-07-04T02:59:42 (imported from GitLab project)

<em>created by: thrrgilag</em> Subsequent to the KeyError the appservice maybe responding with 500 causing the server to back-off of requests thereby breaking the bridge until the bridge is restarted. *By Morgan McMillian on 2018-07-04T02:59:42 (imported from GitLab project)*
thrrgilag commented 2018-01-10 04:11:42 +00:00 (Migrated from gitlab.com)

created by: thrrgilag

The error occurs because the invite and leave events are being processed by the appservice directly, where as the on message event is being passed to the bot which isn't aware of the room changes.

By Morgan McMillian on 2018-07-04T02:59:43 (imported from GitLab project)

<em>created by: thrrgilag</em> The error occurs because the invite and leave events are being processed by the appservice directly, where as the on message event is being passed to the bot which isn't aware of the room changes. *By Morgan McMillian on 2018-07-04T02:59:43 (imported from GitLab project)*
thrrgilag commented 2018-01-10 04:30:57 +00:00 (Migrated from gitlab.com)

created by: thrrgilag

handle invite for direct chat through the bot...

By Morgan McMillian on 2018-07-04T02:59:43 (imported from GitLab project)

<em>created by: thrrgilag</em> <a href="/thrrgilag/pnut-matrix/commit/91ede1edc705cd97736026eb6f8b5c11c0367e09">handle invite for direct chat through the bot...</a> *By Morgan McMillian on 2018-07-04T02:59:43 (imported from GitLab project)*
thrrgilag commented 2018-01-10 04:52:07 +00:00 (Migrated from gitlab.com)

created by: thrrgilag

By Morgan McMillian on 2018-07-04T02:59:44 (imported from GitLab project)

<em>created by: thrrgilag</em> *By Morgan McMillian on 2018-07-04T02:59:44 (imported from GitLab project)*
thrrgilag commented 2018-07-04 02:59:44 +00:00 (Migrated from gitlab.com)

closed

By Morgan McMillian on 2018-07-04T02:59:44 (imported from GitLab project)

closed *By Morgan McMillian on 2018-07-04T02:59:44 (imported from GitLab project)*
thrrgilag commented 2018-07-04 02:59:46 +00:00 (Migrated from gitlab.com)

unlocked this issue

By Morgan McMillian on 2018-07-04T02:59:46 (imported from GitLab project)

unlocked this issue *By Morgan McMillian on 2018-07-04T02:59:46 (imported from GitLab project)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: spacenerdmo/pnut-matrix#16
No description provided.