Crash when opening group chat info
Versions:
- OS: Windows 10
- GTK Version: 3.24.34
- PyGObject Version: 3.42.1
- GLib Version : 2.72.2
- python-nbxmpp Version: 3.1.0
- Gajim Version: 1.4.6
Traceback
Traceback (most recent call last):
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.10/site-packages/gajim/gtk/controls/groupchat.py", line 380, in _on_details
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.10/site-packages/gajim/gtk/util.py", line 679, in open_window
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.10/site-packages/gajim/gtk/groupchat_details.py", line 74, in __init__
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.10/site-packages/gajim/gtk/groupchat_details.py", line 145, in _add_groupchat_info
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.10/site-packages/gajim/gtk/groupchat_info.py", line 195, in set_from_disco_info
File "C:/msys64/home/appveyor/gajim/win/_build_root/mingw64/lib/python3.10/site-packages/gajim/gtk/groupchat_info.py", line 147, in set_subject
AttributeError: 'str' object has no attribute 'author'
Steps to reproduce the problem
In any group chat, click the menu button -> details. The above error message appears.
Any further attempt result in a blank window opening.
This seems to be caused by the muc_subject parameter passed to set_subject in groupchat_info.py being a string instead of the expected object. I'm not sure if this is due to a bug in gajim or to the server misbehaving (it's an Openfire 4.5.1).
I attached a patch that fixes the crash, setting only the subject text to muc_subject when it's a string. It shouldn't affect functionality when muc_subject is an object. 0001-Fix-group-chat-info-window-crashing-when-subject-is-.patch (no merge request since apparently I don't have the rights to fork the project)