-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add flag to get only info/system messages of chat #2132
Conversation
I miss background for this, was this "audit log" discussed anywhere? Is it going to be implemented in all clients? |
Right, I forgot to link the forum entry https://support.delta.chat/t/show-audit-log-of-group/512.
First it goes into desktop as an experimental feature, as there are still some UX questions (as where to put the menu item and where to display the time of the info messages.) Then afterwards we can put it into the mobile clients too. So in the first stage this will be a desktop only feature. I discussed this a bit in an av with @r10s so there is unfortunately not much more logged conversation I can point you to other than the forum entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some minor comments, in general, this lgtm. i am not so sure how useful the audit log is at all, but we will see :)
useful for creating an "audit log" view of a chat that helps to find actions like who added/removed who quickly and without endless scrolling
(that it test without daymarker)
apply suggestions of r10s
Co-authored-by: bjoern <r10s@b44t.com>
d0bb120
to
7154a47
Compare
i also could not reproduce the clippy errors locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm now :)
* refactor: move sql into own mod * refactor: resultify sql interface * fixup * start usage of sqlx * compile again * migrate exists * migrate query_row and query_row_optional * migrate table_exists * migrate with_conn * migrate rowid * migrate most of query_map * finish query_map migration * remove rusqlite and fixup examples * improve migrations and ensure closing * fix rust tests * wip * fixup rebase and get things to compile * start fixing tests * use sqlx fork * debugging * fix receive imf insert * fix message loading * fix grpid bug * exists() expects COUNT() in sql-statement * fix two more exists() statements * fix test_audit_log_view_without_daymarker * Fix clippy warnings * fix test_fetch_existing dc_get_config() must never return NULL, instead return "" * ffi: make render_info accept non-option BTreeMap * fix a typo * Restore changes from PR #2258 They have been accidentally reverted during sqlx rebasing * Remove useless cast that was not there before switch to sqlx * Split long query into several lines so rustfmt does not fail * Remove outdated comment DC_CONTACT_ID_SELF is bound into the query now. * Split long lines to make rustfmt work * Restore accidentally removed part of PR #2132 * Make rustfmt work * Use exists() instead of count() in is_group_explicitly_left * Make rustfmt work * Fix a typo ("foreing") * Fix rustfmt * Fix formatting * Replace 0x100 constant with Origin::IncomingReplyTo * Replace constant 100 with Chattype::Single * Remove commented out code * peerstate: make rustfmt work * Move the code to make msg immutable * do not re-use bind parameters sqlx does not bind the first `?` implicitly to `?1`, therefore the sql-statement fails. we could use `?1` several times, however, i did not find good documentation about that, and even if that works now, that could fail with other db or even with sqlite in newer versions. therefore, we just bind every parameter explicitly. * Do not use read only sqlite mode * Factor out database pool creation * Open reader pool in readonly mode if database is opened in readonly mode * Add a test for reopening the database * sql::table_exists: drain response stream to avoid breaking connection * Drain the stream in Sql.col_exists * sqlx: fix failing TestOnlineAccount::test_saved_mime_on_received_message (#2323) * add failing tests for save_mime_headers * fix saving mime if an encrypted message is received, and we do not have the decoded data, for whatever reason, save the raw data. * let dc_get_mime_headers return NULL on empty string * let test_save_mime_headers_*() tests return anyhow::Result<()> * make clippy happy * Remove 5 unwraps * Remove another unwrap * Replace {:?} with {:#} for error handling * Remove all dbg! statements * set max_connections=10 (default), show num_cpus in get_info() setting the number of connections to the number of cpus seems to be to low in general: - on a mac i5 from 2017, that would result in 4 connections - on an iphone7, that would result in only 2 connections the sqlx-default is 10 connections, so, this pr uses that default (plus 1 connection for the writer tag). on the iphone7, that change was directly noticable - sqlx with 2 connections feelt not much faster that rusqlite with 10 connections, however, using sqlx with the 10+1 connection was a real boost, at least at a first glance :) might be, fewer connections would be sufficient as well, however, i do not see much reasons not to go with the default here. * Disable sqlx statement cache This is a workaround for launchbadge/sqlx#1147 Draining statement results is no longer needed. * Make clippy happy * Do not pass NULL to mime_headers column nor expect it from there. Treat existing NULL as "empty string". * Increase SQL busy timeout to 100 seconds No need to abort the connection if all connections are stalled for 10 seconds. This did not happen, just to make sure each timeout is a result of an actual deadlock. * README: specify log target to get rid of sqlx query logging * Remove 3 unwrap()'s * Remove two more unwrap()'s Co-authored-by: B. Petersen <r10s@b44t.com> Co-authored-by: Hocuri <hocuri@gmx.de> Co-authored-by: link2xt <link2xt@testrun.org>
useful for creating an "audit log" view of a chat that helps to find
actions like who added/removed who quickly and without endless scrolling.