mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
added a button to validate them wrote sticker validation test wrote sticker validation performance test
18 lines
328 B
Swift
18 lines
328 B
Swift
//
|
|
// 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
|
|
}
|
|
}
|