borogove
created pr with
borogove/outgoing-e2ee-status.1
added borogove/outgoing-e2ee-status.2
1: 9b2b378 = 1: b641e78 Record if a send message was e2ee
-: ------- > 2: 9dbe688 review comments
commented
borogove/Chat.hx:284 — I think this would read better like:
return switch (e2eePreference) {
case OMEMO: EncryptionInfo.forSent(NS.OMEMO);
case NoE2EE: null;
case Default: defaultE2ee();
};
added borogove/outgoing-e2ee-status.3
1: b641e78 ! 1: a6d1b46 Record if a send message was e2ee
2: 9dbe688 = 2: 8565503 review comments
-: ------- > 3: 6b1d111 comments
cmds
checkout latest patchset:
ssh pr.pico.sh pull borogove:outgoing-e2ee-status | git am -3checkout specific patchset revision:
ssh pr.pico.sh pull borogove:outgoing-e2ee-status [rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh borogove:outgoing-e2ee-statusadd comment to patch request:
ssh pr.pico.sh comment borogove:outgoing-e2ee-status "lgtm!"
Patchset
borogove/outgoing-e2ee-status.3
comments
Stephen Paul Weber
2026-11-16T16:26:28ZSemantic diff summary
0 added,
0 modified,
0 signature changed,
0 removed
across 0 analyzed files
(2 files skipped: unsupported file type)
+2
-1
borogove/Chat.hx
#
| ... | ... | @@ -1428,7 +1428,6 @@ class DirectChat extends Chat { | |
| 1428 | 1428 | case NoE2EE: | |
| 1429 | 1429 | return Promise.resolve({ stanza: stanza, encryptionInfo: null }); | |
| 1430 | 1430 | case Default: | |
| 1431 | - | // Instead of reassigning so this becomes impossible can we just call the default preference in here? Pretty much same suggestion as I put on intendedEncryption | |
| 1432 | 1431 | throw "Impossible"; | |
| 1433 | 1432 | } | |
| 1434 | 1433 | #end |
| ... | ... | @@ -2536,6 +2535,8 @@ class Channel extends Chat { | |
| 2536 | 2535 | }; | |
| 2537 | 2536 | } | |
| 2538 | 2537 | // how would it already have encryption? | |
| 2538 | + | // I don't think it will on any current code path, | |
| 2539 | + | // but if we add one tha sets this up and then calls this, we don't need to override? | |
| 2539 | 2540 | if (message.encryption == null) message.encryption = intendedEncryption(e2eePreference); | |
| 2540 | 2541 | return message; | |
| 2541 | 2542 | } |
+1
-0
borogove/Client.hx
#
| ... | ... | @@ -2231,6 +2231,7 @@ class Client extends EventEmitter { | |
| 2231 | 2231 | var preference:OutgoingE2EEPreference = Default; | |
| 2232 | 2232 | #if !NO_OMEMO | |
| 2233 | 2233 | // so what happens in NO_OMEMO case now? a failure? | |
| 2234 | + | // in NO_OMEMO case it will stay set to Default which will end up with NoE2ee which is all that build can do anyway | |
| 2234 | 2235 | if (m.encryption != null) preference = OMEMO; | |
| 2235 | 2236 | #end | |
| 2236 | 2237 | chat.sendMessageStanza(stanza, null, preference).then((encryption) -> applySentEncryption(chat, ChatMessageBuilder.fromMessage(m), encryption)); |