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.2
review comments
Eric Roberts
2026-11-13T16:36:01ZSemantic diff summary
0 added,
0 modified,
0 signature changed,
0 removed
across 0 analyzed files
(2 files skipped: unsupported file type)
+2
-0
borogove/Chat.hx
#
| ... | ... | @@ -1429,6 +1429,7 @@ class DirectChat extends Chat { | |
| 1429 | 1429 | case NoE2EE: | |
| 1430 | 1430 | return Promise.resolve({ stanza: stanza, encryptionInfo: null }); | |
| 1431 | 1431 | case Default: | |
| 1432 | + | // 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 | 1433 | throw "Impossible"; | |
| 1433 | 1434 | } | |
| 1434 | 1435 | #end |
| ... | ... | @@ -2535,6 +2536,7 @@ class Channel extends Chat { | |
| 2535 | 2536 | sortId: { method: "between", lower: lower, upper: null }, | |
| 2536 | 2537 | }; | |
| 2537 | 2538 | } | |
| 2539 | + | // how would it already have encryption? | |
| 2538 | 2540 | if (message.encryption == null) message.encryption = intendedEncryption(e2eePreference); | |
| 2539 | 2541 | return message; | |
| 2540 | 2542 | } |
+1
-0
borogove/Client.hx
#
| ... | ... | @@ -2230,6 +2230,7 @@ class Client extends EventEmitter { | |
| 2230 | 2230 | // Don't silently downgrade a message that was meant to be encrypted | |
| 2231 | 2231 | var preference:OutgoingE2EEPreference = Default; | |
| 2232 | 2232 | #if !NO_OMEMO | |
| 2233 | + | // so what happens in NO_OMEMO case now? a failure? | |
| 2233 | 2234 | if (m.encryption != null) preference = OMEMO; | |
| 2234 | 2235 | #end | |
| 2235 | 2236 | chat.sendMessageStanza(stanza, null, preference).then((encryption) -> applySentEncryption(chat, ChatMessageBuilder.fromMessage(m), encryption)); |