When re-evaluating our dependencies we decided that the update bridge
has a high potential for security issues because it's not widely used.
Additionally similar functionality is already present in qTox.
* When the DB schema was too new we were accessing history anyways. This
has potential to just completely corrupt the DB
* When history was disabled there was a chance we would attempt to write
to history anyways. Added more checks in this area
* Chatform was accessing invalid iterators when there were no displayed
messages. Added a guard for this case
Group calls are supposed to show the name of each member under their
avatars. The color of the text was previously fixed to white regardless
of the background ignoring the color of the background.
This fix ensures that the background color is not the same color as the
label text
Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.
This fix avoids the oscillations by fixing the scrollbar to always be
shown
Group calls are supposed to show the name of each member under their
avatars. The color of the text was previously fixed to white regardless
of the background ignoring the color of the background.
This fix ensures that the background color is not the same color as the
label text
Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.
This fix avoids the oscillations by fixing the scrollbar to always be
shown
The call to Core::getGroupPeerNames is expected to return a list where
the index in the list is the group member id. In any error case we were
previously breaking this constraint. It turns out that every time
someone joins a group we call this function before they have a valid
name resulting in their id not being added to the list.
This fix ensures that the list coming out of Core::getGroupPeerNames
always has a full list.
Fixes#5838
On application close we used to access invalid memory associated with
the audio subsystem. This was because on destruction of static variables
we tried to access state associated with an already destructed item.
These variables seem to have no good reason to be static. They should be
tied to a single CoreAV instance and are only accessed through an
existing CoreAV instance.
The previous implementation of hiding the date line would cause 100% cpu
usage. When the date line was shown it would hide the top line, causing
the date line to be hidden again due to a state change in which dates
was visible.
This is a minimal patch to work around the issue by pretending the line
covered by the date line is the first visible line when the dateline is
shown
Fixes#5620
The call to Core::getGroupPeerNames is expected to return a list where
the index in the list is the group member id. In any error case we were
previously breaking this constraint. It turns out that every time
someone joins a group we call this function before they have a valid
name resulting in their id not being added to the list.
This fix ensures that the list coming out of Core::getGroupPeerNames
always has a full list.
Fixes#5838
Before a bug in qTox would make it possible for a user to try to send an empty
action type message. This would fail to send at toxcore, but still be persisted
in history, causing it to fail every time FauxOfflineEngine tried to resend
it. Moving these stuck messages into the broke_messages table will stop qTox
from attempting to deliver them on each connect, and display in the GUI to
users that the messages aren't really pending anymore.
Otherwise sending just "/me " calls down to core with 0-length action, which
causes a toxcore send error.
There may be messages that are stuck in history as pending with "/me " content,
causing them to fail to send on every start. Those should be moved to the new
broken_messages table, similar to stuck pending messages from #5776. There's no
reason this fix to stop adding more broken messages needs to wait on the
history fix, though.
"Sent" to "Delivered", since that's what we're tracking also rename "isOffline"
to "isPending", which is boolean the same, but "isOffline" was opposite of its
correct value before, so boolean reverse the assignment.
Fix#5776
Due to a long standing bug, faux offline message have been able to become stuck
going back years. Because of recent fixes to history loading, faux offline
messages will correctly all be sent on connection, but this causes an issue of
long stuck messages suddenly being delivered to a friend, out of context,
creating a confusing interaction. To work around this, this upgrade moves any
faux offline messages in a chat that are older than the last successfully
delivered message, indicating they were stuck, to a new table,
`broken_messages`, preventing them from ever being sent in the future.
This allows upgrade steps to query the db at the last version and run C++ code
on the results, then do a single transaction to make the upgrade, instead of
all actions of each upgrade step being required to be part of the overall
upgrade transaction.
* Fix callback hookup order in ChatHistory
* Add correct call to SessionChatLog to insert an unfinished message
* Fix incorrect logic in parsing History database response
following https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override
virtual means exactly and only "this is a new virtual function."
override means exactly and only "this is a non-final overrider."
final means exactly and only "this is a final overrider."
Nothing was changed from e.g. override to final, just reduced duplication of
these labels.
This commit makes LoginScreen return QDialog::Rejected (0) and
QDialog::Accepted (1) instead of C standard return values. This should be more
robust with regards to special cases in Qt implementation.
Fixes#5781
qTox added specialized tray icon backends over time to work around bugs with
the default implementation, since then our GTK+2 backend has stopped working,
our appindicator backend was never selected by default by cmake, and
statusnotifier was never selected at SystemTrayIcon construction, leaving us
only ever using the broken GTK+2 backend, or theoretically the Unity backend,
which I didn't see selected on Ubuntu 16.04 Unity. In all other cases we would
fall back to the Qt backend.
Qt icon has improved over time, and our platform specific icons have become
stale, with GTK+2 becoming deprecated and GTK+3 not having a similar feature,
QSystemTrayIcon has been tested on a variety of DEs and works as well or better
in all cases, as shown in the table at
https://github.com/qTox/qTox/issues/5881#issuecomment-541892457Fix#5881Fix#5859
Errors are parsed and printed, but which specific node is being connected to
isn't very relevant to any errors that would occur, and the nodes list is
already updated to prune offline nodes based on nodes.tox.chat periodically.
This provides some extra privacy about which connections are being made,
even though the bootstrap nodes are already public.
Use a macro to embed line number of call sight, instead of just using line
number of log site, since logger functions can be called from different
toxcore API usages.
ChatLogIdx is a strong type where the underlying data is only supposed
to be used in very rare circumstances. The ChatLog providing the indexes
provides no guarantees about what the first ChatLogIdx or last
ChatLogIdx will be. This commit removes unnecessary casts to underlying
data and fixes assumptions made about the underlying data
The button didn't work that well and caused all kinds of issues inside
the code, so I replaced it by a notice that changes to the Advanced
settings only apply after a restart of qTox.
In the process I also removed all code that was exclusively used for
that feature.
We may add it back later when qTox's internal architecture makes it less
cumbersome.
Fix#5763
remove restriction to not update messages not in last slot in chatform,
allowing completed messages to be timestamped at any position. Fixes
stuck spinner in cases where a second message was sent quickly, or an
incoming message was received before the last send message was completed.
This is a quick fix to load settings before Core is started. Ideally
this would not need to be inside the Profile, but at the moment the
decryption key is not available before starting Core.
TriKriSta (5):
fix: data validation during the search (fix: #5791, #5723)
feat: check chat status before start a search
feat: save selected search text after scrolling up
refactor: optimize load messages during the search
fix: update workerStb
This is a quick fix to load settings before Core is started. Ideally
this would not need to be inside the Profile, but at the moment the
decryption key is not available before starting Core.
Widget was only connecting the Core to itself during initialization, but the Core instance could change during a restartCore call. This commit will make Widget link the Core to itself when it changes rather than only on initialization.
Fixes#5710
Functional changes
* Offline messages are still sent when the chat log is cleared
* Spinner now does not wait for history to be complete, just a receipt
from our friend
* Export chat and load chat history are now available in group chats
* Merged save chat log and export chat log
* Note that we lost the info messages in the process
NonFunctional Changes
* FileTransferWidget slots only called for correct file
* Settings::getEnableGroupChatsColor now embedded in
GenericChatForm::colorizeNames
* Settings::setEnableGroupChatscolor now emits signal connected to
GenericChatForm::setColorizedNames to keep state in sync
* Chatlog history not reloaded on setPassword()
* I am pretty sure this had no purpose
* Removed a lot of responsibility from ChatForm
* History moved to ChatHistory implementation of IChatLog
* OfflineMsgEngine moved to FriendMessageDispatcher
* Export chat and load chat history moved to GenericChatLog
* Backed by IChatLog so can be used generically
* Message processing moved to FriendMessageDispatcher
* The action of sending files to coreFile is still handled by
ChatForm, but displaying of the sent messages is done through IChatLog
-> GenericChatForm
* Search moved to ChatHistory/SessionChatLog
* All insertion of chat log elements should be handled by
GenericChatForm now
* Removed overlapping responsibilities from GroupChatForm
* Search and message sending goes through ichatlog/messagedispatcher
too
* Lots of search functionality pushed down into IChatLog
* Some of the file logic was moved into Widget. This is mostly to avoid
scope increase of this PR even further.
* History APIs removed that were no longer used
* From the archeology I managed, MAX_GROUP_MESSAGE_LEN was a workaround
for an old toxcore bug. Testing removal of this parameter and replacing it
with tox_max_message_length() seems to work fine.
This commit ignores the possibility of invalid length error being thrown
by a title after we've already checked its size the first time. We also
assume that a group chat cannot cease existing while we iterate over the
retrieved groups.
Mick Sayson (3):
feat(offlinemsg): Force offline messages to always be enabled
refactor(offlinemsg): Decouple OfflineMsgEngine from other components
feat(offlinemsg): Enable offline messages with no history