// SPDX-FileCopyrightText: 2023 Joshua Goins // SPDX-License-Identifier: GPL-3.0-or-later #include "utils/customemoji.h" QList CustomEmoji::parseCustomEmojis(const QJsonArray &json) { QList emojis; for (auto emojiObj : json) { if (!emojiObj.isObject()) { continue; } CustomEmoji customEmoji{}; customEmoji.shortcode = emojiObj[QStringLiteral("shortcode")].toString(); customEmoji.url = emojiObj[QStringLiteral("static_url")].toString(); emojis.push_back(customEmoji); } return emojis; } #include "moc_customemoji.cpp"