diff options
-rw-r--r-- | TODO | 5 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 10 |
2 files changed, 12 insertions, 3 deletions
@@ -187,4 +187,7 @@ Cache solved 4chan captcha solution (and challenge id) on disk. ttl is (always?) Posting on bant doesn't work for some reason. The request is sent successfully but the comment never appears on the website. 4chan_pass cookie is needed to get captcha without slider. How to get this without an account? 4chan website sets this for anon too. Handle replaces_state in matrix to get correct order for states? -Handle users_default power level in matrix.
\ No newline at end of file +Handle users_default power level in matrix. +Remove power_levels from sync and request them manually when entering a room. +Synapse is gay and mentions do not actually include the whole mxid. It only includes the username part of it. This conflicts with quickmedia notification and mentions where quickmedia includes the mxid in the mention instead, + while the user might have disable username mentions. In those cases the user wont get a notification for mxid mention. Mention name instead?
\ No newline at end of file diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 0bb3e7b..58a90c9 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -576,8 +576,9 @@ namespace QuickMedia { read_marker_message_timestamp = read_marker_message->timestamp; } - if(read_marker_message_timestamp == 0 || read_marker_message_timestamp < room->read_marker_event_timestamp) - read_marker_message_timestamp = room->read_marker_event_timestamp; + const int64_t qm_read_marker = room->read_marker_event_timestamp; + if(read_marker_message_timestamp == 0 || read_marker_message_timestamp < qm_read_marker) + read_marker_message_timestamp = qm_read_marker; std::shared_ptr<Message> last_new_message = get_last_message_by_timestamp(new_messages); if(!last_new_message) @@ -2022,6 +2023,11 @@ namespace QuickMedia { read_marker_message_timestamp = read_marker_message->timestamp; } + // TODO: Make sure |events_set_user_read_marker| is called before |events_add_messages| so this is set + const int64_t qm_read_marker = room_data->read_marker_event_timestamp; + if(read_marker_message_timestamp == 0 || read_marker_message_timestamp < qm_read_marker) + read_marker_message_timestamp = qm_read_marker; + for(auto &message : new_messages) { // TODO: Is @room ok? shouldn't we also check if the user has permission to do @room? (only when notifications are limited to @mentions) // TODO: Is comparing against read marker timestamp ok enough? |