You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an error when i try to work with one of the Session IDs I have got, the ID works in Session to bring me to the conversation with contact. But sogs or its db returns an exception working with this ID:
Command: $ for id in 059f682874598018d8a8ac1754fecd9d4791d38fc2ce1b36ffdbf6fe9387e42517; do sogs --rooms roomnamehere --add-moderators $id --hidden; done
Output:
server config[2879754] INFO Loading config from /etc/sogs/sogs.ini
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
[self.dialect.do](http://self.dialect.do/)_execute(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
sqlite3.IntegrityError: CHECK constraint failed: NOT (banned AND (moderator OR admin))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/sogs/__main__.py", line 450, in <module>
room.set_moderator(
File "/usr/lib/python3/dist-packages/sogs/model/room.py", line 1582, in set_moderator
query(
File "/usr/lib/python3/dist-packages/sogs/db.py", line 54, in query
return dbconn.execute(q, **params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
[self.dialect.do](http://self.dialect.do/)_execute(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) CHECK constraint failed: NOT (banned AND (moderator OR admin))
[SQL:
INSERT INTO user_permission_overrides
(room,
"user",
moderator,
admin,
visible_mod)
VALUES (?, ?, TRUE, ?, ?)
ON CONFLICT (room, "user") DO UPDATE SET
moderator = excluded.moderator,
admin = excluded.admin,
visible_mod = excluded.visible_mod
]
[parameters: (9, 5841, False, False)]
(Background on this error at: http://sqlalche.me/e/13/gkpj)
when i convert that Session ID into blinded one (151e4d191846ae1ff86e9b960af98e1b6d2612a361dbf83142d3407272d4b14c0f), using the script:
I suspect that this exception is caused by the ID being banned at the time of trying to add it as a moderator and after removing ban of that blinded Session ID (i did via Session GUI), it worked to add as a mod, i may be wrong.
Though this exception should be handled.
Hello,
Debian 11, PySOGS 0.3.7, sqlite 3.34.1
There is an error when i try to work with one of the Session IDs I have got, the ID works in Session to bring me to the conversation with contact. But sogs or its db returns an exception working with this ID:
Command:
$ for id in 059f682874598018d8a8ac1754fecd9d4791d38fc2ce1b36ffdbf6fe9387e42517; do sogs --rooms roomnamehere --add-moderators $id --hidden; done
Output:
when i convert that Session ID into blinded one (151e4d191846ae1ff86e9b960af98e1b6d2612a361dbf83142d3407272d4b14c0f), using the script:
then the initial command "sogs --rooms roomnamehere --add-moderators $id --hidden" works for that blinded ID, without producing above mentioned error.
The text was updated successfully, but these errors were encountered: