borogove

created pr with borogove/muc-create.1 on 2026-10-28T20:49:38Z · by 9e834e0d
added borogove/muc-create.2 on 2026-10-30T12:26:53Z · by 3c31bc8c
1: 7eacfb3 < -: ------- Initial channel creation
2: 4b5a982 ! 1: d85d8d1 review
3: 8c9556b < -: ------- Support intant room creation
4: 941aad7 < -: ------- Add tests
added borogove/muc-create.3 on 2026-11-03T03:40:00Z · by 9e834e0d
-: ------- > 1: 0aa766b Initial channel creation
1: d85d8d1 ! 2: a7f33d5 After config form is submitted, creation is complete
-: ------- > 3: e6042b0 Support intant room creation
-: ------- > 4: 366bac7 Add tests
-: ------- > 5: fece298 review
-: ------- > 6: 322b2bd Review replies
added borogove/muc-create.4 on 2026-11-03T03:42:40Z · by 9e834e0d
1: 0aa766b = 1: 0aa766b Initial channel creation
2: a7f33d5 = 2: a7f33d5 After config form is submitted, creation is complete
3: e6042b0 = 3: e6042b0 Support intant room creation
4: 366bac7 ! 4: 0da1c7e Add tests
5: fece298 = 5: 86bad8e review
6: 322b2bd = 6: 997cf5a Review replies
commented on 2026-11-09T14:24:06Z · by 3c31bc8c
lgtm!
cmds
checkout latest patchset:
ssh pr.pico.sh pull borogove:muc-create | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull borogove:muc-create [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh borogove:muc-create
add comment to patch request:
ssh pr.pico.sh comment borogove:muc-create "lgtm!"
+15 -1 borogove/Chat.hx #
......@@ -1657,6 +1657,19 @@ class Channel extends Chat {
16571657 }
16581658 }
16591659
1660+ @:allow(borogove)
1661+ private function completeCreation(): Void {
1662+ if (uiState != Creating) return;
1663+
1664+ uiState = Open;
1665+ outbox.start();
1666+ client.channelPinger.schedule(this);
1667+ persistence.storeChats(client.accountId(), [this]);
1668+ persistence.storeMembers(client.accountId(), chatId, [self]).then(_ -> trigger("members/update", [self]));
1669+ client.sortChats();
1670+ client.trigger("chats/update", [this]);
1671+ }
1672+
16601673 private function selfPingSuccess() {
16611674 if (nickInUse() != client.displayName()) {
16621675 final desiredFullJid = JID.parse(chatId).withResource(client.displayName());
......@@ -1785,7 +1798,8 @@ class Channel extends Chat {
17851798 override public function commands(): Promise<Array<Command>> {
17861799 return super.commands().then((cmds: Array<Command>) -> {
17871800 if (isOwner()) {
1788- cmds.push(new MucSettingsCommand(client, JID.parse(chatId)));
1801+ final onCompleted = uiState == Creating ? () -> completeCreation() : null;
1802+ cmds.push(new MucSettingsCommand(client, JID.parse(chatId), onCompleted));
17891803 }
17901804 return cmds;
17911805 });
+12 -1 borogove/MucSettingsCommand.hx #
......@@ -12,9 +12,19 @@ import HaxeCBridge;
1212 #end
1313
1414 class MucSettingsCommand extends Command {
15+ private var onCompleted: Null<()->Void>;
16+
1517 @:allow(borogove)
16- public function new(client: Client, jid: JID) {
18+ public function new(client: Client, jid: JID, ?onCompleted: ()->Void) {
1719 super(client, { jid: jid, name: "Settings", node: "muc-settings" });
20+ this.onCompleted = onCompleted;
21+ }
22+
23+ @:allow(borogove.MucSettingsCommandSession)
24+ private function notifyCompleted() {
25+ final cb = onCompleted;
26+ onCompleted = null;
27+ if (cb != null) cb();
1828 }
1929
2030 override public function execute(): Promise<CommandSession> {
......@@ -82,6 +92,7 @@ class MucSettingsCommandSession extends CommandSession {
8292 return;
8393 }
8494
95+ Util.downcast(this.command, MucSettingsCommand)?.notifyCompleted();
8596 resolve(new MucSettingsCommandSession("completed", null, [], [], this.command));
8697 });
8798 this.command.client.sendQuery(q);
Back to top