| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-03-18 19:54:52 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-03-18 19:54:52 UTC |
| parent | 75b83cbff0a8fbb79a0c33480ab5239b22b40f07 |
| snikket/Chat.hx | +4 | -4 |
| snikket/ReactionUpdate.hx | +1 | -1 |
| snikket/persistence/SqliteDriver.js.hx | +1 | -1 |
diff --git a/snikket/Chat.hx b/snikket/Chat.hx index 104e498..6098826 100644 --- a/snikket/Chat.hx +++ b/snikket/Chat.hx @@ -801,7 +801,7 @@ class DirectChat extends Chat { @HaxeCBridge.noemit // on superclass as abstract public function removeReaction(m:ChatMessage, reaction:Reaction) { - if (Std.is(reaction, CustomEmojiReaction)) { + if (Std.isOfType(reaction, CustomEmojiReaction)) { if (reaction.envelopeId == null) throw "Cannot remove custom emoji reaction without envelopeId"; final correct = m.reply(); correct.localId = ID.long(); @@ -816,7 +816,7 @@ class DirectChat extends Chat { for (areaction => reacts in m.reactions) { if (areaction != reaction.key) { final react = reacts.find(r -> r.senderId == client.accountId()); - if (react != null && !Std.is(react, CustomEmojiReaction)) { + if (react != null && !Std.isOfType(react, CustomEmojiReaction)) { reactions.push(react); } } @@ -1318,7 +1318,7 @@ class Channel extends Chat { @HaxeCBridge.noemit // on superclass as abstract public function removeReaction(m:ChatMessage, reaction:Reaction) { - if (Std.is(reaction, CustomEmojiReaction)) { + if (Std.isOfType(reaction, CustomEmojiReaction)) { if (reaction.envelopeId == null) throw "Cannot remove custom emoji reaction without envelopeId"; final correct = m.reply(); correct.localId = ID.long(); @@ -1333,7 +1333,7 @@ class Channel extends Chat { for (areaction => reacts in m.reactions) { if (areaction != reaction.key) { final react = reacts.find(r -> r.senderId == getFullJid().asString()); - if (react != null && !Std.is(react, CustomEmojiReaction)) reactions.push(react); + if (react != null && !Std.isOfType(react, CustomEmojiReaction)) reactions.push(react); } } final update = new ReactionUpdate(ID.long(), m.serverId, m.chatId(), null, m.chatId(), getFullJid().asString(), Date.format(std.Date.now()), reactions, EmojiReactions); diff --git a/snikket/ReactionUpdate.hx b/snikket/ReactionUpdate.hx index 37eade3..becf330 100644 --- a/snikket/ReactionUpdate.hx +++ b/snikket/ReactionUpdate.hx @@ -87,7 +87,7 @@ class ReactionUpdate { stanza.tag("reactions", { xmlns: "urn:xmpp:reactions:0", id: localId ?? serverId }); for (reaction in reactions) { - if (!Std.is(reaction, CustomEmojiReaction)) stanza.textTag("reaction", reaction.text); + if (!Std.isOfType(reaction, CustomEmojiReaction)) stanza.textTag("reaction", reaction.text); } stanza.up(); diff --git a/snikket/persistence/SqliteDriver.js.hx b/snikket/persistence/SqliteDriver.js.hx index 0c185fb..5dcdade 100644 --- a/snikket/persistence/SqliteDriver.js.hx +++ b/snikket/persistence/SqliteDriver.js.hx @@ -17,7 +17,7 @@ class SqliteDriver { public function new(dbfile: String) { Worker1.v2({ worker: () -> new js.html.Worker( - untyped new js.html.URL("sqlite-worker1.mjs", untyped __js__('import.meta.url')), + untyped new js.html.URL("sqlite-worker1.mjs", js.Syntax.code("import.meta.url")), untyped { type: "module" } ) }).then(promiser -> {