Skip to content

Commit

Permalink
Remove “Refresh Group” debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
max-signal committed Jan 10, 2025
1 parent 85c265a commit 4d70aaa
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions Signal/src/ViewControllers/DebugUI/DebugUIGroupsV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ class DebugUIGroupsV2: DebugUIPage {
sectionItems.append(OWSTableItem(title: "Send partially-invalid group messages.") { [weak self] in
self?.sendPartiallyInvalidGroupMessages(groupThread: groupThread)
})
sectionItems.append(OWSTableItem(title: "Update v2 group immediately.") { [weak self] in
self?.updateV2GroupImmediately(groupThread: groupThread)
})
}

return OWSTableSection(title: "Groups v2", items: sectionItems)
Expand Down Expand Up @@ -417,26 +414,6 @@ class DebugUIGroupsV2: DebugUIPage {
Logger.info("Success.")
}
}

private func updateV2GroupImmediately(groupThread: TSGroupThread) {
guard let groupModelV2 = groupThread.groupModel as? TSGroupModelV2 else {
owsFailDebug("Invalid groupModel.")
return
}
let groupId = groupModelV2.groupId
let groupSecretParamsData = groupModelV2.secretParamsData
Task {
do {
try await SSKEnvironment.shared.groupV2UpdatesRef.tryToRefreshV2GroupUpToCurrentRevisionImmediately(
groupId: groupId,
groupSecretParams: try GroupSecretParams(contents: [UInt8](groupSecretParamsData))
)
Logger.info("Success.")
} catch {
owsFailDebug("Error: \(error)")
}
}
}
}

#endif

0 comments on commit 4d70aaa

Please sign in to comment.