[question] jid whitelist #22

Closed
opened 2024-10-12 00:24:16 +02:00 by roughnecks · 4 comments

How do I set multiple jids in whitelist?

ERROR    Error handling {jabber:client}presence stanzaace ...
Traceback (most recent call last):
  File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/slixmpp/xmlstream/xmlstream.py", line 1107, in handler_callback_routine
    await cb(data)
  File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/kaikout/xmpp/client.py", line 254, in on_muc_presence
    if jid_bare and jid_bare not in self.settings[room]['jid_whitelist']:
                                    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'jid_whitelist'
ERROR    'jid_whitelist'
Traceback (most recent call last):
  File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/slixmpp/xmlstream/xmlstream.py", line 1107, in handler_callback_routine
    await cb(data)
  File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/kaikout/xmpp/client.py", line 254, in on_muc_presence
    if jid_bare and jid_bare not in self.settings[room]['jid_whitelist']:
                                    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'jid_whitelist'

I tried like this:

["otherbot@domain.tld", "onemore@domain.tld"]

How do I set multiple jids in whitelist? ``` ERROR Error handling {jabber:client}presence stanzaace ... Traceback (most recent call last): File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/slixmpp/xmlstream/xmlstream.py", line 1107, in handler_callback_routine await cb(data) File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/kaikout/xmpp/client.py", line 254, in on_muc_presence if jid_bare and jid_bare not in self.settings[room]['jid_whitelist']: ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'jid_whitelist' ERROR 'jid_whitelist' Traceback (most recent call last): File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/slixmpp/xmlstream/xmlstream.py", line 1107, in handler_callback_routine await cb(data) File "/home/bots/.local/pipx/venvs/kaikout/lib/python3.11/site-packages/kaikout/xmpp/client.py", line 254, in on_muc_presence if jid_bare and jid_bare not in self.settings[room]['jid_whitelist']: ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'jid_whitelist' ``` I tried like this: ["otherbot@domain.tld", "onemore@domain.tld"]
Author

This seems to be fixed by deleting old toml files for mucs insde .local/share/kaikout/toml/*.toml

not sure if the bot is supposed to update them automatically after changes to settings.toml

feel free to close this, in case.

This seems to be fixed by deleting old toml files for mucs insde `.local/share/kaikout/toml/*.toml` not sure if the bot is supposed to update them automatically after changes to settings.toml feel free to close this, in case.
Author

Ah, yes, another thing.. before deleting those files, I reverted jid_whithelist to "[]", but the bot continued to crash.
Now I used the "whitelist + jid" command and added my other bots this way.

Ah, yes, another thing.. before deleting those files, I reverted `jid_whithelist` to "[]", but the bot continued to crash. Now I used the "whitelist + jid" command and added my other bots this way.
Owner

Is it working as expected?

Shall we close this ticket?

Is it working as expected? Shall we close this ticket?
Author

Looks like it is. Closing

Looks like it is. Closing
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
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: sch/KaikOut#22
No description provided.