Always check signatures on profile events
These contain sensitive data (lightning addresses) and it would be really bad if these were forged. Changelog-Changed: Always check signatures of profile events
This commit is contained in:
@@ -15,6 +15,7 @@ class EventCache {
|
||||
private var cancellable: AnyCancellable?
|
||||
private var translations: [String: TranslateStatus] = [:]
|
||||
private var artifacts: [String: NoteArtifacts] = [:]
|
||||
var validation: [String: ValidationResult] = [:]
|
||||
|
||||
//private var thread_latest: [String: Int64]
|
||||
|
||||
@@ -26,6 +27,14 @@ class EventCache {
|
||||
}
|
||||
}
|
||||
|
||||
func is_event_valid(_ evid: String) -> ValidationResult {
|
||||
guard let result = validation[evid] else {
|
||||
return .unknown
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func store_translation_artifacts(evid: String, translated: TranslateStatus) {
|
||||
self.translations[evid] = translated
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user