added validat() to MSSticker via an extension

added a button to validate them
wrote sticker validation test
wrote sticker validation performance test
This commit is contained in:
neon443 committed 2025-10-30 21:55:22 +00:00
1 parent 3bd0892d42
commit dd02d5ca80
4 files changed
+77 -2

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
//
// MSSticker.swift
// StickerSlack
//
// Created by neon443 on 30/10/2025.
//
import Foundation
import Messages
extension MSSticker {
func validate() -> Bool {
let sizeGood = try? Data(contentsOf: imageFileURL).count < 500_000
let nameGood = self.description.count < 150
return sizeGood ?? false && nameGood
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.