Skip to content
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

Disappearing message rebuild #731

Merged
merged 405 commits into from
Feb 27, 2024

Conversation

RyanRory
Copy link
Collaborator

@RyanRory RyanRory commented Nov 2, 2022

No description provided.

@RyanRory RyanRory changed the title [WIP] Disappearing Message [WIP] Disappearing message rebuild Nov 2, 2022
@RyanRory RyanRory changed the title [WIP] Disappearing message rebuild Disappearing message rebuild Dec 8, 2022
@RyanRory RyanRory marked this pull request as ready for review December 8, 2022 00:48
Copy link
Collaborator

@mpretty-cyro mpretty-cyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We are looking to discuss some potential changes to the tech design as the updated user config handling might be able to be completed before this goes live so before running through these issues it might be good to touch base as there may be more/less work to do 😉

Session/Conversations/ConversationVC.swift Outdated Show resolved Hide resolved
Session/Conversations/ConversationVC.swift Outdated Show resolved Hide resolved
Session/Conversations/Views & Modals/InfoBanner.swift Outdated Show resolved Hide resolved
Session/Meta/AppDelegate.swift Outdated Show resolved Hide resolved
SessionMessagingKit/Jobs/Types/SyncExpiriesJob.swift Outdated Show resolved Hide resolved
SessionMessagingKit/Messages/Message.swift Outdated Show resolved Hide resolved
Session/Conversations/ConversationViewModel.swift Outdated Show resolved Hide resolved
@RyanRory RyanRory changed the title Disappearing message rebuild [WIP] Disappearing message rebuild Jan 10, 2023
RyanRory and others added 4 commits February 27, 2023 09:38
…-redesign

# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/Settings/ThreadDisappearingMessagesViewModel.swift
#	Session/Shared/Views/SessionCell+AccessoryView.swift
#	SessionMessagingKit/Configuration.swift
#	SessionMessagingKit/Database/Models/Interaction.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SessionUtilitiesKit/Database/Models/Job.swift
interactionExpirationInfosByExpiresInSeconds.forEach { expiresInSeconds, expirationInfos in
let expirationTimestampMs: Int64 = Int64(ceil(startedAtMs + expiresInSeconds * 1000))

SnodeAPI.updateExpiry(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the app closes before these succeed?

openGroupServerMessageId: message.openGroupServerMessageId.map { Int64($0) }
).update(db)
// Only store the server hash of a sync message if the message is self send valid
if (message.isSelfSendValid && isSyncMessage || !message.isSelfSendValid) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing an issue where open group DMs were appearing twice (because it was failing this check) - I updated the check to the below but you should probably test and make sure the logic is what you were after:

if (message.isSelfSendValid && isSyncMessage || !isSyncMessage)

mpretty-cyro and others added 18 commits May 10, 2023 14:15
…ling' into disappearing-message-redesign

# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/ConversationViewModel.swift
#	Session/Conversations/Settings/ThreadDisappearingMessagesSettingsViewModel.swift
#	Session/Conversations/Settings/ThreadSettingsViewModel.swift
#	Session/Conversations/Views & Modals/ConversationTitleView.swift
#	Session/Notifications/AppNotifications.swift
#	Session/Settings/NukeDataModal.swift
#	Session/Shared/SessionTableViewModel.swift
#	Session/Shared/Views/SessionCell.swift
#	SessionMessagingKit/Configuration.swift
#	SessionMessagingKit/Database/Models/Contact.swift
#	SessionMessagingKit/Database/Models/DisappearingMessageConfiguration.swift
#	SessionMessagingKit/Messages/Control Messages/ClosedGroupControlMessage.swift
#	SessionMessagingKit/Messages/Message.swift
#	SessionMessagingKit/Messages/Visible Messages/VisibleMessage.swift
#	SessionMessagingKit/Protos/Generated/SNProto.swift
#	SessionMessagingKit/Protos/Generated/SessionProtos.pb.swift
#	SessionMessagingKit/Protos/SessionProtos.proto
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ExpirationTimers.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift
#	SessionMessagingKitTests/_TestUtilities/TestOnionRequestAPI.swift
#	SessionSnodeKit/Models/SnodeAPIEndpoint.swift
#	SessionSnodeKit/SnodeAPI.swift
#	SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift
#	SessionUtilitiesKit/General/Features.swift
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 14.88055% with 2494 lines in your changes are missing coverage. Please review.

Project coverage is 11.44%. Comparing base (c3f3b50) to head (6e8e72c).
Report is 407 commits behind head on dev.

❗ Current head 6e8e72c differs from pull request most recent head f528742. Consider uploading reports for the commit f528742 to get more accurate results

Files Patch % Lines
.../ThreadDisappearingMessagesSettingsViewModel.swift 45.10% 213 Missing ⚠️
...ions/Views & Modals/SessionLabelCarouselView.swift 0.00% 158 Missing ⚠️
...base/Models/DisappearingMessageConfiguration.swift 37.56% 118 Missing ⚠️
...sations/Views & Modals/ConversationTitleView.swift 0.00% 110 Missing ⚠️
...sionMessagingKit/Jobs/Types/GetExpirationJob.swift 0.00% 99 Missing ⚠️
...ge Handling/MessageReceiver+ExpirationTimers.swift 16.10% 99 Missing ⚠️
Session/Conversations/ConversationVC.swift 0.00% 90 Missing ⚠️
...ion/Conversations/ConversationVC+Interaction.swift 0.00% 89 Missing ⚠️
...ionUtil/Config Handling/SessionUtil+Contacts.swift 10.20% 88 Missing ⚠️
.../Conversations/Message Cells/InfoMessageCell.swift 0.00% 87 Missing ⚠️
... and 70 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #731      +/-   ##
==========================================
+ Coverage   11.43%   11.44%   +0.01%     
==========================================
  Files         633      643      +10     
  Lines       95960    98320    +2360     
==========================================
+ Hits        10970    11253     +283     
- Misses      84990    87067    +2077     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mpretty-cyro mpretty-cyro merged commit 0410384 into oxen-io:dev Feb 27, 2024
1 check was pending
@mpretty-cyro mpretty-cyro mentioned this pull request Feb 27, 2024
@mpretty-cyro mpretty-cyro mentioned this pull request Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants