| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-12-07 01:25:15 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-12-07 01:25:15 UTC |
| parent | 99a03150f7ff5f56e27d0354db446b58d0d706dd |
| borogove/Chat.hx | +2 | -2 |
| borogove/Profile.hx | +12 | -10 |
diff --git a/borogove/Chat.hx b/borogove/Chat.hx index 3c8f2ab..e2fe81b 100644 --- a/borogove/Chat.hx +++ b/borogove/Chat.hx @@ -764,7 +764,7 @@ abstract class Chat { /** Invite another chat's participants to participate in this one **/ - public function invite(chat: Chat, threadId: Null<String> = null) { + public function invite(other: Chat, threadId: Null<String> = null) { final attr: DynamicAccess<String> = { xmlns: "jabber:x:conference", jid: chatId @@ -773,7 +773,7 @@ abstract class Chat { attr.set("continue", "true"); attr.set("thread", threadId); } - chat.sendMessageStanza( + other.sendMessageStanza( new Stanza("message").tag("x", attr).up() ); } diff --git a/borogove/Profile.hx b/borogove/Profile.hx index 6948e59..dca49e1 100644 --- a/borogove/Profile.hx +++ b/borogove/Profile.hx @@ -68,40 +68,42 @@ class ProfileItem { return item.name; } - public function parameters() { + public function parameters(): Array<ProfileItem> { final params = item.getChild("parameters")?.allTags() ?? []; return params.map(param -> new ProfileItem(param)); } - public function text() { + public function text(): Array<String> { return item.allTags("text").map(s -> s.getText()); } - public function uri() { + public function uri(): Array<String> { return item.allTags("uri").map(s -> s.getText()); } - public function date() { + public function date(): Array<String> { return item.allTags("date").map(s -> s.getText()); } - public function time() { + public function time(): Array<String> { return item.allTags("time").map(s -> s.getText()); } - public function datetime() { + public function datetime(): Array<String> { return item.allTags("datetime").map(s -> s.getText()); } - public function boolean() { + @HaxeCBridge.noemit + public function boolean(): Array<Bool> { return item.allTags("boolean").map(s -> s.getText() == "true"); } - public function integer() { - return item.allTags("integer").map(s -> Std.parseInt(s.getText())); + @HaxeCBridge.noemit + public function integer(): Array<Int> { + return item.allTags("integer").map(s -> Std.parseInt(s.getText()) ?? 0); } - public function languageTag() { + public function languageTag(): Array<String> { return item.allTags("language-tag").map(s -> s.getText()); } }