Git Product home page Git Product logo

czateria's Introduction

czateria in Qt

This repository contains a reimplementation of the protocol used by the Polish chatroom network called Czateria, along with a simple GUI.

Basic functionality, that is :

  • logging in as a guest with and without a nickname,
  • logging in as a registered user,
  • sending and receiving chatroom messages,
  • sending and receiving private messages,
  • sending and receiving images in private conversations,
  • user profile information.

is working.

Certain things are missing, most notably graphical icons in conversations and text formatting.

Additional icons courtesy of FamFamFam and Small-n-flat. Czateria favicon used without permission.

Disclaimer

This software is not endorsed in any way by the owner of Czateria. Please use it at your own risk.

czateria's People

Contributors

lighterowl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

czateria's Issues

Registered nick doesn't see any user in room

When I login using registered user (login+pass), room is empty, user lists is empty, can't see any public chat. On console I'm getting message:

"{\"subcode\":1,\"id\":0,\"isAnyRegShowAlready\":false,\"detailsCode\":0,\"type\":0,\"time\":0,\"code\":150}"

ui doesn't close prompt window "new private conversation" when other person disconnects

Hi!
I noticed that quite often windows with question about acceptation of new private message remain even when other nick (usually spambot) disconnect from czat.
Parsed debug log looks like below:

{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":0,"lon":0,"lat":0,"token":"894336873","avatarId":"0","code"
:184,"date":"2020-06-06T02:17:06"}
{"user":"gość_94945378","permission":1,"code":140,"date":"2020-06-06T02:17:15"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:15"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:18"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:19"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:20"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:21"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:22"}
{"userName":"gość_94945378","bornDate":"","reasonId":0,"sex":"\u0000","description":"","searchSex":"\u0000","searchAgeFrom":0,"searchAgeTo":0,"uid":16922440,"lon":0,"lat":0,"token":"894336873","avatarId":"0"
,"code":184,"date":"2020-06-06T02:17:26"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:28"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:30"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:31"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:34"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:36"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:37"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:39"}
{"login":"gość_94945378","code":130,"date":"2020-06-06T02:17:39"}
{"user":"gość_94945378","hasPrivs":0,"code":137,"date":"2020-06-06T02:17:40"}
{"subcode":1,"user":"gość_94945378","type":0,"imgWidth":0,"imgHeight":0,"msg":"Oto prawdziwa SEKS wersja Facebooka, zapraszaj osoby które chcesz pieprzyć i dymaj na:","msgColorId":0,"msgIsBold":false,"msgIsI
talic":false,"msgIsUnderline":false,"msgFontTypeId":0,"msgStyleId":0,"nickColorId":0,"code":97,"date":"2020-06-06T02:17:45"}
{"subcode":1,"user":"gość_94945378","type":0,"imgWidth":0,"imgHeight":0,"msg":"www.szmateria.pl","msgColorId":1,"msgIsBold":true,"msgIsItalic":false,"msgIsUnderline":true,"msgFontTypeId":0,"msgStyleId":14,"n
ickColorId":0,"code":97,"date":"2020-06-06T02:17:45"}
{"user":"gość_94945378","hasPrivs":1,"code":137,"date":"2020-06-06T02:17:46"}
{"login":"gość_94945378","code":130,"date":"2020-06-06T02:18:15"}
{"subcode":15,"user":"gość_94945378","type":0,"imgWidth":0,"imgHeight":0,"msg":"","msgColorId":0,"msgIsBold":false,"msgIsItalic":false,"msgIsUnderline":false,"msgFontTypeId":0,"msgStyleId":0,"nickColorId":0,
"code":97,"date":"2020-06-06T02:18:15"}
{"login":"gość_94945378","code":130,"date":"2020-06-06T02:18:15"}
{"login":"gość_94945378","code":130,"date":"2020-06-06T02:18:16"}

Segfault, probably due to not reacting for invitation

Hi:)
This segfaut is strange, probably this is related to not reacting for invitation for long time but I didn't notice this bug earlier.
Here is backtrace:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `ui/ui'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  QTypedArrayData<Czateria::Message>::constEnd (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qarraydata.h:215
215         const_iterator constBegin(const_iterator = const_iterator()) const { return data(); }
[Current thread is 1 (Thread 0x7fba2efc1800 (LWP 1534235))]
(gdb) bt
#0  QTypedArrayData<Czateria::Message>::constEnd (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qarraydata.h:215
#1  QVector<Czateria::Message>::cend (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:211
#2  Czateria::ChatSession::emitPendingMessages (this=0x55695972c2d0, it=...) at chatsession.cpp:579
#3  0x0000556954c98b63 in Czateria::ChatSession::acceptPrivateConversation (this=<optimized out>, nickname=...) at chatsession.cpp:232
#4  0x0000556954c85081 in MainChatWindow::doAcceptPrivateConversation (this=0x5569596b65f0, nickname=...) at mainchatwindow.cpp:447
#5  0x00007fba321a7458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fba3302a722 in QDialog::finished(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007fba330636ad in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007fba33065290 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007fba321a7300 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fba32fc3333 in QDialogButtonBox::clicked(QAbstractButton*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007fba32fc3af9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007fba321a7300 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007fba32f1c806 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007fba32f1ca2e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fba32f1de73 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fba32f1e035 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fba32e6a2b6 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007fba32e27a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007fba32e31343 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007fba3217b93a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007fba32e30457 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007fba32e8635d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007fba32e891ec in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007fba32e27a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007fba32e310f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007fba3217b93a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fba327f87d3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#28 0x00007fba327fa10b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#29 0x00007fba327d435b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#30 0x00007fba2e8db32e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#31 0x00007fba31101fbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fba31102240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fba311022e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fba321d3565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007fba3217a4db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007fba32182246 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x0000556954c6ab44 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:46

Autojoin

It should be possible to choose a set of rooms to join automatically after launching the program.

Suggested in #3.

Autoreconnection sometimes fails

Hi!

I noticed that reconnection fails sometimes. Probably this happens when relogin ahppens to a couple of rooms in short time. Interia returns:

[165373.235] debug QUrl("https://czateria-api.interia.pl/scp/user/login") "nickname=redacted&roomName=redacted&roomId=redacted&password=redacted"
[165373.235] info Connection closed by server, trying to reconnect
[165373.235] debug {"code":33}
[165373.235] info Received code 33 message while waiting for hello
[165373.235] debug {"code":33}
[snip]
[165373.553] debug {"data":{"0":"eeb587361c61619283f23dd0141024d3","1":"redacted","userPerm":1,"loginDate":"13-01-2020,11:14:31","settings":{"NICK_COLOUR":"0","MAX_PRIVS":"7"}},"status":1,"code":1,"msg":"OK"}
[165373.561] debug {"data":{"0":"5ae21bec5ed8510705f89b1ceb73bb7f","1":"redacted","userPerm":1,"loginDate":"13-01-2020,11:14:31","settings":{"NICK_COLOUR":"0","MAX_PRIVS":"7"}},"status":1,"code":1,"msg":"OK"}            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
            <head>
            <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
            <meta http-equiv="content-language" content="pl" />
            <meta name="robots" content="index,follow,all" />
            <title>Komunikat - INTERIA.PL</title>
            <script type="text/javascript" id="cintpl_loader"
                src="http://x.interia.pl/cintpl/cintpl_70124.js"></script>
            <script type="text/javascript" language="JavaScript"
                src="http://yaep.interia.pl/503.js" charset="iso-8859-2"></script>
            <style type="text/css" media="screen">
            @import url('http://yaep.interia.pl/styles.css');
            </style>
            </head>

            <body>
            <div id="container">
            <div id="interiaHeader"></div>
            <div id="content">
            <div id="site404">
            <div class="error">
            <h2>Komunikat: chwilowa niedostępność</h2>
            <p>Szanowni Państwo, aktualnie mogą wystąpić chwilowe trudności w
            korzystaniu z serwisu, prosimy spróbować ponownie za chwilę.</p>
            </div>
            </div>
            <div id="siteMap"></div>
            <div id="footer"></div>
            <p id="copyright"></p>
            </div>
            </div>
            </body>
            </html>

            <!-- Generated by H4 on 2020-01-13 11:14:31 -->


[165373.569] debug {"data":{"0":"5c42a1bc2e4122686e728404759b8016","1":"redacted","userPerm":1,"loginDate":"13-01-2020,11:14:31","settings":{"NICK_COLOUR":"0","MAX_PRIVS":"7"}},"status":1,"code":1,"msg":"OK"}

The result is reconnection fails for a part of chat rooms. I think should be added random delay before relogin. If possible it could be good to detect such error.

Ignore user on invitation to priv

Sometimes users are very aggressive. They want to say something "very important" to other users and doesn't care if someone want to read them.
It would be nice to have button "ignore" to add such user even to on-memory ignore list.

channel id in debug message

Is it possible to add field with room id or room name in debug output, when msg with code:129 is received?

segfault after some time (probably while reconnecting)

Hi!
New version with autojoin throws segfault after about 7h, probably reconnect fails.

Reading symbols from /home/a1/czateria/ui/ui...done.
[New LWP 19969]
[New LWP 19977]
[New LWP 19974]
[New LWP 19979]
[New LWP 19983]
[New LWP 19975]
[New LWP 19980]
[New LWP 28623]
[New LWP 19981]
[New LWP 19976]
[New LWP 19982]
[New LWP 19978]
[New LWP 19984]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `ui/ui'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  std::__lower_bound<const Czateria::Room*, Czateria::Room, __gnu_cxx::__ops::_Iter_comp_val<Czateria::RoomListModel::roomFromId(int) const::<lambda(auto:1&&, auto:2&&)> > > (
    __val=<synthetic pointer>..., __last=<optimized out>, __first=0x5441d49bfb0c1cc1, __comp=...) at /usr/include/c++/7/bits/stl_algobase.h:959
959               if (__comp(__middle, __val))
[Current thread is 1 (Thread 0x7f5aa5367040 (LWP 19969))]
(gdb) #0  0x00005561e3d970a9 in std::__lower_bound<const Czateria::Room*, Czateria::Room, __gnu_cxx::__ops::_Iter_comp_val<Czateria::RoomListModel::roomFromId(int) const::<lambda(auto:1&&, auto:2&&)> > > (__val=<synthetic pointer>..., __last=<optimized out>, __first=0x5441d49bfb0c1cc1, __comp=...) at /usr/include/c++/7/bits/stl_algobase.h:959
#1  0x00005561e3d970a9 in std::lower_bound<const Czateria::Room*, Czateria::Room, Czateria::RoomListModel::roomFromId(int) const::<lambda(auto:1&&, auto:2&&)> > (__val=<synthetic pointer>..., __last=<optimized out>, __first=<optimized out>, __comp=...) at /usr/include/c++/7/bits/stl_algo.h:2034
#2  0x00005561e3d970a9 in Czateria::RoomListModel::roomFromId(int) const (this=<optimized out>, roomId=70) at roomlistmodel.cpp:44
#3  0x00005561e3d8c7aa in MainWindow::AutologinState::createSession()::{lambda()#1}::operator()() const (__closure=0x5561e5bb13b0) at mainwindow.cpp:117
#4  0x00005561e3d8c7aa in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainWindow::AutologinState::createSession()::{lambda()#1}>::call({lambda()#1}&, void**) (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#5  0x00005561e3d8c7aa in QtPrivate::Functor<MainWindow::AutologinState::createSession()::{lambda()#1}, 0>::call<QtPrivate::List<>, void>({lambda()#1}&, void*, {lambda()#1}&*) (arg=<optimized out>, f=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#6  0x00005561e3d8c7aa in QtPrivate::QFunctorSlotObject<MainWindow::AutologinState::createSession()::{lambda()#1}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=<optimized out>, this_=0x5561e5bb13a0, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#7  0x00007f5aa377366f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00005561e3d98a88 in Czateria::LoginSession::onReplyReceived(QByteArray const&) (this=0x5561e5b14a00, data=...) at loginsession.cpp:123
#9  0x00005561e3d98d76 in Czateria::LoginSession::<lambda()>::operator() (__closure=0x5561efda8300) at loginsession.cpp:137
#10 0x00005561e3d98d76 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Czateria::LoginSession::sendPostData(const QUrl&, const QUrlQuery&)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#11 0x00005561e3d98d76 in QtPrivate::Functor<Czateria::LoginSession::sendPostData(const QUrl&, const QUrlQuery&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#12 0x00005561e3d98d76 in QtPrivate::QFunctorSlotObject<Czateria::LoginSession::sendPostData(const QUrl&, const QUrlQuery&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x5561efda82f0, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#13 0x00007f5aa377366f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f5aa3cac75f in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#15 0x00007f5aa3d3cd49 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#16 0x00007f5aa37740c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f5aa4a7c83c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f5aa4a84104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f5aa37448d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f5aa374704d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f5aa379e263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f5aa0cb9417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f5aa0cb9650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f5aa0cb96dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f5aa379d88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f5aa374290a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f5aa374b9b4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00005561e3d818d8 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at main.cpp:43
(gdb) quit

After invitation reject can't talk to this person later

When I reject first invitation to private talk, next messages from other person are ignored (doesn't create window with question "no"/"yes") and I can't write to this person if I want initiate priv chat.
Prepare logs?

Multiple messages about logging out of user

Hi Xavery!

I noticed czateria tracks user activity too long. Please look at this:

[18:56:43] <xxx> Hej
[18:58:54] User closed the conversation window
[20:57:35] <xxx> Hej
[21:01:32] User closed the conversation window
[21:11:13] User logged out
[21:27:41] User logged out
[10:04:38] User logged out

Is it possible situation like:

  • I login to room X,Y
  • user A login to rooms X,Y
  • user A starts convertation with me on room Y
  • user A closes conversation window with me
  • user A disconects from room X (not from room Y!)
  • I receive message "User logged out" (?) - if it is possible this is misleading about presence of user in room

segfault: #0 MainWindow::AutologinState::createSession()::{lambda()#2}::operator()() const (__closure=0x564d464ead40) at mainwindow.cpp:129

Hi!
Probably this segfault is due to problem with login (nickname was banned).

this is bt

Core was generated by `ui/ui'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  MainWindow::AutologinState::createSession()::{lambda()#2}::operator()() const (__closure=0x564d464ead40) at mainwindow.cpp:129
129                                    .arg(mLoginIter->username));
[Current thread is 1 (Thread 0x7fa716e4c800 (LWP 28770))]
(gdb) bt
#0  0x0000564d44dd34e1 in MainWindow::AutologinState::createSession()::{lambda()#2}::operator()() const (__closure=0x564d464ead40) at mainwindow.cpp:129
#1  0x0000564d44dd34e1 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainWindow::AutologinState::createSession()::{lambda()#2}>::call({lambda()#2}&, void**) (arg=<optimized ou
t>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#2  0x0000564d44dd34e1 in QtPrivate::Functor<MainWindow::AutologinState::createSession()::{lambda()#2}, 0>::call<QtPrivate::List<>, void>({lambda()#2}&, void*, {lambda()#2}&*) (arg=<optimized out>, f=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#3  0x0000564d44dd34e1 in QtPrivate::QFunctorSlotObject<MainWindow::AutologinState::createSession()::{lambda()#2}, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*
) (which=<optimized out>, this_=0x564d464ead30, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#4  0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x0000564d44df2dc6 in Czateria::LoginSession::loginFailed(Czateria::LoginFailReason, QString) (this=this@entry=0x564d464eab50, _t1=<optimized out>,
    _t1@entry=Czateria::LoginFailReason::NaughtyNick, _t2=...) at moc_loginsession.cpp:163
#6  0x0000564d44de1f11 in Czateria::LoginSession::onReplyReceived(QByteArray const&) (this=0x564d464eab50, data=...) at loginsession.cpp:118
#7  0x0000564d44de23b6 in Czateria::LoginSession::<lambda()>::operator() (__closure=0x564d60bd4990) at loginsession.cpp:137
#8  0x0000564d44de23b6 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Czateria::LoginSession::sendPostData(const QUrl&, const QUrlQuery&)::<lambda()> >::call (arg=<optimized ou
t>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#9  0x0000564d44de23b6 in QtPrivate::Functor<Czateria::LoginSession::sendPostData(const QUrl&, const QUrlQuery&)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#10 0x0000564d44de23b6 in QtPrivate::QFunctorSlotObject<Czateria::LoginSession::sendPostData(const QUrl&, const QUrlQuery&)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *,
QObject *, void **, bool *) (which=<optimized out>, this_=0x564d60bd4980, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168           #11 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fa71579775f in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#13 0x00007fa715827d49 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#14 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007fa716751f17 in QDialog::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007fa7167863a5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x0000564d44dd480a in MainChatWindow::<lambda()>::operator() (__closure=0x564d46b9e280) at mainchatwindow.cpp:268
#28 0x0000564d44dd480a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Cza
teria::Room&, const AppSettings&, MainWindow*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#29 0x0000564d44dd480a in QtPrivate::Functor<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow*)::<lambda
()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#30 0x0000564d44dd480a in QtPrivate::QFunctorSlotObject<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow
*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x564d46b9e270, r=<optimized out>, a=<optimized out>, ret=<opti
mized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#31 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x0000564d44dea724 in Czateria::ChatSession::onTextMessageReceived(QString const&) (this=0x564d46b690b0, text=...) at chatsession.cpp:374
#33 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007fa715a9dc75 in QWebSocket::textMessageReceived(QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#35 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007fa715a9f245 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#37 0x00007fa715a9c33a in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#38 0x00007fa715a8d0b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#39 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#45 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007fa716751f17 in QDialog::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#51 0x00007fa7167863a5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x0000564d44dd480a in MainChatWindow::<lambda()>::operator() (__closure=0x564d46f11970) at mainchatwindow.cpp:268
#53 0x0000564d44dd480a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Cza
teria::Room&, const AppSettings&, MainWindow*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#54 0x0000564d44dd480a in QtPrivate::Functor<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow*)::<lambda
()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#55 0x0000564d44dd480a in QtPrivate::QFunctorSlotObject<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow
*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x564d46f11960, r=<optimized out>, a=<optimized out>, ret=<opti
mized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#56 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#57 0x0000564d44dea724 in Czateria::ChatSession::onTextMessageReceived(QString const&) (this=0x564d46ed8640, text=...) at chatsession.cpp:374
#58 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#59 0x00007fa715a9dc75 in QWebSocket::textMessageReceived(QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#60 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#61 0x00007fa715a9f245 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#62 0x00007fa715a9c33a in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#63 0x00007fa715a8d0b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#64 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#65 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#66 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#67 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#68 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#69 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#70 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#71 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#72 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#73 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#74 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#75 0x00007fa716751f17 in QDialog::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#76 0x00007fa7167863a5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#77 0x0000564d44dd480a in MainChatWindow::<lambda()>::operator() (__closure=0x564d46ecf2a0) at mainchatwindow.cpp:268
#78 0x0000564d44dd480a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Cza
teria::Room&, const AppSettings&, MainWindow*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#79 0x0000564d44dd480a in QtPrivate::Functor<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow*)::<lambda
()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#80 0x0000564d44dd480a in QtPrivate::QFunctorSlotObject<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow
*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x564d46ecf290, r=<optimized out>, a=<optimized out>, ret=<opti
mized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#81 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#82 0x0000564d44dea724 in Czateria::ChatSession::onTextMessageReceived(QString const&) (this=0x564d46e9a070, text=...) at chatsession.cpp:374
#83 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#84 0x00007fa715a9dc75 in QWebSocket::textMessageReceived(QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#85 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#86 0x00007fa715a9f245 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#87 0x00007fa715a9c33a in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#88 0x00007fa715a8d0b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#89 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#90 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#91 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#92 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#93 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#94 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#95 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#96 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#97 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#98 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#99 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#100 0x00007fa716751f17 in QDialog::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#101 0x00007fa7167863a5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#102 0x0000564d44dd480a in MainChatWindow::<lambda()>::operator() (__closure=0x564d46b21680) at mainchatwindow.cpp:268
#103 0x0000564d44dd480a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Cz
ateria::Room&, const AppSettings&, MainWindow*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#104 0x0000564d44dd480a in QtPrivate::Functor<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow*)::<lambd
a()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#105 0x0000564d44dd480a in QtPrivate::QFunctorSlotObject<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindo
w*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x564d46b21670, r=<optimized out>, a=<optimized out>, ret=<opt
imized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#106 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#107 0x0000564d44dea724 in Czateria::ChatSession::onTextMessageReceived(QString const&) (this=0x564d46aec2d0, text=...) at chatsession.cpp:374
#108 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#109 0x00007fa715a9dc75 in QWebSocket::textMessageReceived(QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#110 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#111 0x00007fa715a9f245 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#112 0x00007fa715a9c33a in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#113 0x00007fa715a8d0b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#114 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#115 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#116 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#117 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#118 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#119 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#120 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#121 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#122 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#123 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#124 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#125 0x00007fa716751f17 in QDialog::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#126 0x00007fa7167863a5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#127 0x0000564d44dd480a in MainChatWindow::<lambda()>::operator() (__closure=0x564d46b60140) at mainchatwindow.cpp:268
#128 0x0000564d44dd480a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Cz
ateria::Room&, const AppSettings&, MainWindow*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#129 0x0000564d44dd480a in QtPrivate::Functor<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow*)::<lambd
a()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#130 0x0000564d44dd480a in QtPrivate::QFunctorSlotObject<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindo
w*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x564d46b60130, r=<optimized out>, a=<optimized out>, ret=<opt
imized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#131 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#132 0x0000564d44dea724 in Czateria::ChatSession::onTextMessageReceived(QString const&) (this=0x564d46b2af70, text=...) at chatsession.cpp:374
#133 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#134 0x00007fa715a9dc75 in QWebSocket::textMessageReceived(QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#135 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#136 0x00007fa715a9f245 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#137 0x00007fa715a9c33a in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#138 0x00007fa715a8d0b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#139 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#140 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#141 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#142 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#143 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#144 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#145 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#146 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#147 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#148 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#149 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#150 0x00007fa716751f17 in QDialog::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#151 0x00007fa7167863a5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#152 0x0000564d44dd480a in MainChatWindow::<lambda()>::operator() (__closure=0x564d46c9de70) at mainchatwindow.cpp:268
#153 0x0000564d44dd480a in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Cz
ateria::Room&, const AppSettings&, MainWindow*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:130
#154 0x0000564d44dd480a in QtPrivate::Functor<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindow*)::<lambd
a()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:240
#155 0x0000564d44dd480a in QtPrivate::QFunctorSlotObject<MainChatWindow::MainChatWindow(QSharedPointer<Czateria::LoginSession>, Czateria::AvatarHandler&, const Czateria::Room&, const AppSettings&, MainWindo
w*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x564d46c9de60, r=<optimized out>, a=<optimized out>, ret=<opt
imized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:168
#156 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#157 0x0000564d44dea724 in Czateria::ChatSession::onTextMessageReceived(QString const&) (this=0x564d46c68ba0, text=...) at chatsession.cpp:374
#158 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#159 0x00007fa715a9dc75 in QWebSocket::textMessageReceived(QString const&) () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#160 0x00007fa714fd466f in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#161 0x00007fa715a9f245 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#162 0x00007fa715a9c33a in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#163 0x00007fa715a8d0b8 in  () at /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#164 0x00007fa714fd50c2 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#165 0x00007fa71656783c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#166 0x00007fa71656f104 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#167 0x00007fa714fa58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#168 0x00007fa714fa804d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#169 0x00007fa714fff263 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#170 0x00007fa7122cd417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#171 0x00007fa7122cd650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#172 0x00007fa7122cd6dc in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#173 0x00007fa714ffe88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174 0x00007fa714fa390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#175 0x00007fa714fac9b4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#176 0x0000564d44dc36f7 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at main.cpp:43
(gdb)

Private conversation tab is sometimes closed when another party disconnects

Unfortunately there's no clear reproduction path here, and what's worse it doesn't seem like there's an obvious-ish code path that would cause closing the tab altogether when the conversation partner disconnects.
Perhaps this is related to the Qt version, since the only time I could reproduce it is under Ubuntu 18.04 with the default Qt 5.9 by doing the following :

  • Open a private conversation.
  • Write something to the other side and close the conversation window. Keep the other side's tab still open.
  • Write something again.
  • Disconnect.
  • The other side's tab is closed.

Replace notifications about incoming private messages with something less intrusive

Incoming private conversations are now signalled by creating a modal message box prompting the user to accept or reject the conversation. This is slightly inconvenient, especially when writing a message, though the default Y and N keyboard shortcuts are disabled in that dialog to prevent accidentally accepting/rejecting a conversation.
A better idea would be to notify the user via a non-intrusive mechanism like the Desktop Notifications on Linux, and an analogous way on Windows if one exists. The request would then appear as an ordinary unread tab, but with an appropriate message and yes/no buttons after clicking it instead of the text widget that appears with ordinary conversations.

Segfault related to Notification style = Native

Hi!
I noticed reproducible segfault.
Two users, let user B has "Notification style = Native".

  • user A sends msg to user B
  • user B rejects invitation from native ui window (not from systray notification)
  • user A again sends msg to user B
  • segfault
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f3d20335b1e in QCoreApplication::postEvent(QObject*, QEvent*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
[Current thread is 1 (Thread 0x7f3d1d178800 (LWP 1397360))]
(gdb) bt
#0  0x00007f3d20335b1e in QCoreApplication::postEvent(QObject*, QEvent*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x000055b460e9a964 in ChatWindowTabWidget::PrivateChatTab::removePendingAcceptWidget (this=0x55b461a7a3e0) at chatwindowtabwidget.cpp:100
#2  ChatWindowTabWidget::openPrivateMessageTab (this=0x55b4616cec60, nickname=...) at chatwindowtabwidget.cpp:131
#3  0x000055b460e951de in MainChatWindow::onNewPrivateConversation (this=0x55b4616cc370, nickname=...) at mainchatwindow.cpp:407
#4  0x00007f3d2035e458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x000055b460eb5b39 in Czateria::ChatSession::newPrivateConversation (this=this@entry=0x55b4616c4070, _t1=...) at moc_chatsession.cpp:307
#6  0x000055b460eab526 in Czateria::ChatSession::handlePrivateMessage (this=0x55b4616c4070, json=...) at chatsession.cpp:434
#7  0x000055b460eacd65 in Czateria::ChatSession::onTextMessageReceived (this=0x55b4616c4070, text=...) at chatsession.cpp:350
#8  0x00007f3d2035e458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f3d2087afa9 in QWebSocket::textMessageReceived(QString const&) () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#10 0x00007f3d2035e458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f3d2087c609 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#12 0x00007f3d2087949a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#13 0x00007f3d20865323 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#14 0x00007f3d2035ed5a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f3d20fdea66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f3d20fe80f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f3d2033293a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f3d203355b8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f3d2038af67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f3d1f2b8fbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007f3d1f2b9240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f3d1f2b92e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f3d2038a565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f3d203314db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f3d20339246 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x000055b460e7ab44 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:46
(gdb)

new url for avatars

Hello,
there is new schema of urls in avatars:

$ curl -I https://qan.interia.pl/chat/applet/chat_resources/images/avatars/users/avatar_xxxxxxxxxxxxxxxx.jpg
HTTP/1.0 302 Moved Temporarily
Date: Thu, 22 Oct 2020 09:02:50 GMT
Server: IPL/2.1
Location: https://i.iplsc.com/-/xxxxxxxxxxxxxxxx-C125.jpg
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from IPL/2.1
X-Cache-Lookup: MISS from IPL/2.1:80
Connection: keep-alive

segfault after kick

Hi!
This segfault is related to two actions:
a) kick & ban on one room
b) new priv on other room

(gdb) bt
#0  0x000055f0775c0836 in std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/include/c++/7/bits/atomic_base.h:396
#1  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qatomic_cxx11.h:227
#2  QBasicAtomicInteger<int>::load (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qbasicatomic.h:102
#3  QtPrivate::RefCount::isShared (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qrefcount.h:101
#4  QVector<Czateria::Message>::isDetached (this=0x55f082e65050) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:108
#5  QVector<Czateria::Message>::detach (this=0x55f082e65050) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:378
#6  QVector<Czateria::Message>::begin (this=0x55f082e65050) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:205
#7  Czateria::ChatSession::emitPendingMessages (this=0x55f07a286a10, it=...) at chatsession.cpp:578
#8  0x000055f0775c099d in Czateria::ChatSession::acceptPrivateConversation (this=<optimized out>, nickname=...) at chatsession.cpp:232
#9  0x000055f0775acb8d in MainChatWindow::doAcceptPrivateConversation (this=0x55f07a285c00, nickname=...) at mainchatwindow.cpp:447
#10 0x00007fa0094d3458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fa00a356722 in QDialog::finished(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007fa00a38f6ad in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007fa00a391290 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007fa0094d3300 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fa00a2ef333 in QDialogButtonBox::clicked(QAbstractButton*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007fa00a2efaf9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fa0094d3300 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fa00a248806 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007fa00a248a2e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007fa00a249e73 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007fa00a24a035 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007fa00a1962b6 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007fa00a153a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007fa00a15d343 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007fa0094a793a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007fa00a15c457 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007fa00a1b235d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007fa00a1b51ec in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007fa00a153a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007fa00a15d0f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007fa0094a793a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007fa009b247d3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#33 0x00007fa009b2610b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#34 0x00007fa009b0035b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007fa005c0732e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#36 0x00007fa00842dfbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007fa00842e240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fa00842e2e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fa0094ff565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007fa0094a64db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007fa0094ae246 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x000055f077595820 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:46

FR: ignored users list kept in file

It would be usefull to have list of ignored users in file. It would save the time when we join chat again, all "smart" users will be already ignored.

nickname in debug log

Hi,
... and would be nice to if you add nickname in debug log when priv message arrived or sent (code:97, subcode:1 and subcode:2), please.

Segfault related to disrupted network connection

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fe2ce4b6214 in QNetworkReply::error() const () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
[Current thread is 1 (Thread 0x7fe2caf3f800 (LWP 1647255))]
(gdb) bt
#0  0x00007fe2ce4b6214 in QNetworkReply::error() const () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#1  0x00005609d3098f99 in Czateria::RoomListModel::onDownloadFinished (this=0x5609d3a81b00) at roomlistmodel.cpp:117
#2  0x00007fe2ce125458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007fe2ce50a72c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#4  0x00007fe2ce5bb7ce in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#5  0x00007fe2ce125d5a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fe2ceda5a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007fe2cedaf0f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007fe2ce0f993a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fe2ce0fc5b8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fe2ce151f67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fe2cd08017d in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007fe2cd080400 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fe2cd0804a3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007fe2ce151565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fe2ce0f84db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fe2cefa9c6d in QDialog::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007fe2cefe2456 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00005609d307fde0 in (anonymous namespace)::networkErrorMessageBox (parent=0x7ffeb3b10cc0, ui=<optimized out>, title=...) at mainwindow.h:34
#19 0x00005609d30800b0 in MainWindow::<lambda(auto:3)>::operator()<QJsonParseError> (__closure=0x5609d3c72180, err=...) at mainwindow.h:34
#20 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QJsonParseError>, void, MainWindow::MainWindow(QNetworkAccessManager*, AppSettings&, Czateria::ChatSessionListener*, QWidget*)::<lambda(auto:3)> >::call (arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146
#21 QtPrivate::Functor<MainWindow::MainWindow(QNetworkAccessManager*, AppSettings&, Czateria::ChatSessionListener*, QWidget*)::<lambda(auto:3)>, 1>::call<QtPrivate::List<QJsonParseError>, void> (
    arg=<optimized out>, f=...) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256
#22 QtPrivate::QFunctorSlotObject<MainWindow::MainWindow(QNetworkAccessManager*, AppSettings&, Czateria::ChatSessionListener*, QWidget*)::<lambda(auto:3)>, 1, QtPrivate::List<QJsonParseError>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x5609d3c72170, r=<optimized out>, a=<optimized out>, ret=<optimized out>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:439
#23 0x00007fe2ce125458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00005609d30aac86 in Czateria::RoomListModel::jsonError (this=this@entry=0x5609d3a81b00, _t1=...) at moc_roomlistmodel.cpp:195
#25 0x00005609d3099105 in Czateria::RoomListModel::onDownloadFinished (this=0x5609d3a81b00) at roomlistmodel.cpp:128
#26 0x00007fe2ce125458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007fe2ce50a72c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#28 0x00007fe2ce5bb7ce in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#29 0x00007fe2ce125d5a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007fe2ceda5a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007fe2cedaf0f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007fe2ce0f993a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007fe2ce0fc5b8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007fe2ce151f67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007fe2cd08017d in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007fe2cd080400 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007fe2cd0804a3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fe2ce151565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007fe2ce0f84db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007fe2ce100246 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00005609d3070b44 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:46

Compilation error mainchatwindow.cpp:88:20: error: ‘class QLatin1String’ has no member named ‘arg’

commit 549cfc4 introduce compilation error on my box (ubuntu 18.04).

g++ -c -pipe -Wextra -Werror -O2 -std=c++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I.. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o mainchatwindow.o mainchatwindow.cpp
mainchatwindow.cpp: In function ‘QString {anonymous}::getImageFilter()’:
mainchatwindow.cpp:88:20: error: ‘class QLatin1String’ has no member named ‘arg’
.arg(QString::fromUtf8(format.constData()).toLower()));

Add handling user ban on room

Hi,
please add handling situation when user is banned on given room. Server returns:

debug {"cardDate":"0","cardDescription":"","cardReasonId":0,"cardSearchAgeFrom":0,"cardSearchAgeTo":0,"cardSearchSex":"0","cardSex":"0","channelName":"20 latki","code":108,"cryptLogin":"","emotionId":0,"isHiddenMode":0,"lat":0,"localIp":"127.0.0.1","login":"foobar","lon":0,"nickColorId":0,"sessionId":"e80af9e7499e0b95e5b428b10d1cb590","slowLogin":false}
debug {"subcode":26,"id":0,"isAnyRegShowAlready":false,"detailsCode":0,"type":17,"time":0,"admin":"","code":150}

Thank you

Segmentation fault, no known reason

Hi:)
I just got SIGSEGV, shortly after joining to the rooms. I don't know what event trigerred it.

Core was generated by `ui/ui'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fea18e66b28 in QCoreApplication::postEvent(QObject*, QEvent*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
[Current thread is 1 (Thread 0x7fea15ca9800 (LWP 1091852))]
(gdb) bt
#0  0x00007fea18e66b28 in QCoreApplication::postEvent(QObject*, QEvent*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x000055f1049089d2 in NotificationSupportMsgBox::removeNotification (this=0x55f10604cd40, nickname=...) at notificationsupport_msgbox.cpp:36
#2  0x000055f1048fec91 in MainChatWindow::onUserLeft (this=0x55f1064058c0, nickname=...) at mainchatwindow.cpp:497
#3  0x00007fea18e8f458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x000055f104922df9 in Czateria::ChatSession::userLeft (this=this@entry=0x55f106404f70, _t1=...) at moc_chatsession.cpp:356
#5  0x000055f104919fc5 in Czateria::ChatSession::onTextMessageReceived (this=0x55f106404f70, text=...) at chatsession.cpp:344
#6  0x00007fea18e8f458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fea193abfa9 in QWebSocket::textMessageReceived(QString const&) () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#8  0x00007fea18e8f458 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fea193ad609 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#10 0x00007fea193aa49a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#11 0x00007fea19396323 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5WebSockets.so.5
#12 0x00007fea18e8fd5a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007fea19b0fa66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007fea19b190f0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007fea18e6393a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fea18e665b8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fea18ebbf67 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fea17de9fbd in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007fea17dea240 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fea17dea2e3 in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fea18ebb565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007fea18e624db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007fea18e6a246 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x000055f1048e7b44 in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:4

Messages sent after invitation is closed aren't delivered

Hi!
Thank you for you work, latest commits bring many changes in application behaviour.
I see some kind of strange behaviour in notifications. One of them is like below:
user A send invitation to talk
user B do nothing (and it gets two notification, modal window and new tab)
user A close tab with chat to user B
user A, modal window disappear but still remains question in tab
user A accept invitation but all messages sent in this chat aren't delivered to user B

Support for quit of private chat invitation

When user send invitation to talk and next close talk then window with question about accepting private chat should disappear (similar like in original web client)

sty 04 20:43:28 debug unknown:0 unknown {"subcode":1,"user":"gość_09545451","type":0,"imgWidth":0,"imgHeight":0,"msg":"a","msgColorId":0,"msgIsBold":false,"msgIsItalic":false,"msgIsUnderline":false,"msgFontTypeId":0,"msgStyleId":0,"nickColorId":0,"code":97}
sty 04 20:43:28 debug unknown:0 unknown {"user":"gość_09545451","hasPrivs":1,"code":137}
sty 04 20:43:35 debug unknown:0 unknown {"subcode":14,"user":"gość_09545451","type":0,"imgWidth":0,"imgHeight":0,"msg":"","msgColorId":0,"msgIsBold":false,"msgIsItalic":false,"msgIsUnderline":false,"msgFontTypeId":0,"msgStyleId":0,"nickColorId":0,"code":97}
sty 04 20:43:35 debug unknown:0 unknown {"user":"gość_09545451","hasPrivs":0,"code":137}

"subcode":14, - is send when first user close window with invitation.

Please add auto reconnection

After couple of hours czateria closes websocket. Maybe it would be easy to add support for automatic recconection? Especially for registered nick.

sty 05 03:53:19 debug unknown:0 unknown {"code":1003}
sty 05 03:53:59 debug unknown:0 unknown {"code":1003}
sty 05 03:54:13 info unknown:0 unknown Socket error QAbstractSocket::RemoteHostClosedError "The TLS/SSL connection has been closed"
sty 05 03:54:13 debug unknown:0 unknown {"code":33}
sty 05 03:54:13 info unknown:0 unknown Unhandled WebSocket message :
sty 05 03:54:13  {"code":33}
sty 05 03:54:13 info unknown:0 unknown Socket error QAbstractSocket::RemoteHostClosedError "The remote host closed the connection"
sty 05 03:54:39 debug unknown:0 unknown {"code":1003}
sty 05 03:55:19 debug unknown:0 unknown {"code":1003}
sty 05 03:55:59 debug unknown:0 unknown {"code":1003}
sty 05 03:56:39 debug unknown:0 unknown {"code":1003}

Undesired notification about user logged out

Hi!
Sometimes I see something like below:

  • user start chat with me
  • I reject chat
  • after some time user logged out from czateria
  • I get new tab with chat with the user, I can see what those user wrote and message that he/she logged out

It looks czateria still track users event even when chat is rejected.

FR: logging conversation to file

Hi!
Thanks for nice czat client :)
I'd like to ask you would it be possible for you to add logging to file private messages and channel messages?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.