Files
StickerSlack/StickerSlack/Models/Cachet/SlackResponse.swift
T
2026-04-08 15:19:10 +01:00

29 lines
502 B
Swift

//
// SlackResponse.swift
// StickerSlack
//
// Created by neon443 on 15/10/2025.
//
import Foundation
@MainActor
struct SlackResponse: Identifiable, Codable {
var type: String
var id: String
var name: String
var imageUrl: String
var alias: String?
static func toEmojis(from response: [SlackResponse]?) -> [Emoji]? {
guard let response else { return nil }
return response.map { item in
Emoji(
name: item.name,
url: URL(string: item.imageUrl)!,
id: item.id
)
}
}
}