Merge remote-tracking branch 'origin/main' into claude/fix-marmot-polling-R83Bs
# Conflicts: # amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt # amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/DecryptAndIndexProcessor.kt
This commit is contained in:
@@ -3111,10 +3111,14 @@ class Account(
|
||||
val innerEvent =
|
||||
com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
.fromJson(json)
|
||||
// MIP-03 inner events are unsigned rumors
|
||||
// (empty sig); pass wasVerified=true so
|
||||
// LocalCache skips the Nostr secp256k1 check
|
||||
// that would silently reject them.
|
||||
// wasVerified=true: MIP-03 inner events are
|
||||
// unsigned rumors (empty sig), authenticated
|
||||
// via the MLS credential-identity check in
|
||||
// GroupEventHandler when first decrypted.
|
||||
// Running Nostr sig verify here (justVerify
|
||||
// via wasVerified=false) would silently drop
|
||||
// kind:7 reactions / kind:5 deletions since
|
||||
// they never carry a Schnorr signature.
|
||||
val isNew = cache.justConsume(innerEvent, null, true)
|
||||
val innerNote = cache.getOrCreateNote(innerEvent.id)
|
||||
if (isNew) {
|
||||
|
||||
+20
-20
@@ -592,28 +592,28 @@ class GroupEventHandler(
|
||||
"GroupEventHandler.add: ApplicationMessage decrypted innerKind=${innerEvent.kind} " +
|
||||
"innerId=${innerEvent.id.take(8)}… author=${innerEvent.pubKey.take(8)}…"
|
||||
}
|
||||
// Treat the inner event as pre-verified. MLS already
|
||||
// authenticated the sender: MarmotInboundProcessor.
|
||||
// processPrivateMessage rejects any inner event whose
|
||||
// `pubkey` field doesn't match the MLS sender's
|
||||
// credential identity. Running Nostr sig verify again
|
||||
// here is a redundant gate — and one that silently
|
||||
// dropped wn-signed inner events (wn's kind:9 rumors
|
||||
// don't always round-trip Amethyst's `event.verify()`,
|
||||
// e.g. because of JSON canonicalization differences).
|
||||
// Without this, justConsume returned false, the chatroom
|
||||
// never got the message, and the operator saw nothing
|
||||
// but a misleading "inner event already in cache" log.
|
||||
// wasVerified=true: MIP-03 inner events are unsigned
|
||||
// rumors (empty sig); LocalCache.justVerify would reject
|
||||
// every one on Schnorr verification. Authenticity is
|
||||
// already guaranteed by MLS — MarmotInboundProcessor
|
||||
// enforces innerEvent.pubKey == MLS sender's credential
|
||||
// identity before returning ApplicationMessage. Without
|
||||
// this, wn-signed kind:9 chat messages, kind:7 reactions,
|
||||
// and kind:5 deletions would all silently drop here.
|
||||
//
|
||||
// Always call marmotGroupList.addMessage regardless of
|
||||
// justConsume's return value. `addMessageSync` dedupes
|
||||
// by Note identity, so a duplicate is a cheap no-op —
|
||||
// but a previous-session persist that hydrated the
|
||||
// cache at startup without populating the chatroom
|
||||
// needs this path to surface the note (otherwise the
|
||||
// operator saw nothing but a misleading "inner event
|
||||
// already in cache" log and the message never rendered).
|
||||
val isNew = cache.justConsume(innerEvent, null, true)
|
||||
val innerNote = cache.getOrCreateNote(innerEvent.id)
|
||||
if (!isNew) {
|
||||
// Legit duplicate: a prior session persisted the
|
||||
// inner JSON and the startup restore loop hydrated
|
||||
// the cache before this kind:445 arrived. The
|
||||
// chatroom may still not have it (restore order /
|
||||
// chatroom snapshot drop), so `addMessage` runs
|
||||
// unconditionally — `MarmotGroupChatroom.addMessageSync`
|
||||
// dedupes by Note identity if it was already there.
|
||||
if (isNew) {
|
||||
innerNote.event = innerEvent
|
||||
} else {
|
||||
Log.d("MarmotDbg") {
|
||||
"GroupEventHandler.add: inner event already in cache — surfacing in chatroom anyway"
|
||||
}
|
||||
|
||||
@@ -1690,7 +1690,7 @@
|
||||
<string name="bradcasting_result_partial">Niektóre akcje nie powiodły się</string>
|
||||
<string name="bradcasting_result_success">Wszystkie akcje udane</string>
|
||||
<string name="bradcasting_result_failure">Wszystkie akcje nieudane</string>
|
||||
<string name="reaction">Reakcja</string>
|
||||
<string name="reaction">Reakcję</string>
|
||||
<string name="voice_post">Wiadomość głosowa</string>
|
||||
<string name="voice_reply">Odpowiedź głosowa</string>
|
||||
<string name="closing_time">Czas zakończenia głosowania</string>
|
||||
|
||||
@@ -458,6 +458,11 @@
|
||||
<string name="public_chats">公共聊天</string>
|
||||
<string name="follow_packs">关注包</string>
|
||||
<string name="live_streams">直播</string>
|
||||
<string name="audio_rooms">音频室</string>
|
||||
<string name="audio_room_stage">阶段</string>
|
||||
<string name="audio_room_audience">观众</string>
|
||||
<string name="audio_room_raise_hand">举手</string>
|
||||
<string name="audio_room_lower_hand">放下手</string>
|
||||
<string name="longs">视频</string>
|
||||
<string name="articles">文章</string>
|
||||
<string name="private_bookmarks">私人书签</string>
|
||||
@@ -818,6 +823,16 @@
|
||||
<string name="call_settings_turn_url">服务器 URL</string>
|
||||
<string name="call_settings_turn_username">用户名</string>
|
||||
<string name="call_settings_turn_credential">凭证</string>
|
||||
<string name="always_on_notif_channel_description">保持与收件箱中继的连接以便接收实时通知</string>
|
||||
<string name="always_on_notif_title">Amethyst 通知活跃</string>
|
||||
<string name="always_on_notif_connected">已连接到 %1$d 个收件箱中继</string>
|
||||
<string name="always_on_notif_connecting">正在连接到收件箱中继\u2026</string>
|
||||
<string name="always_on_notif_stop">暂停</string>
|
||||
<string name="always_on_notif_setting_title">始终开启通知服务</string>
|
||||
<string name="always_on_notif_setting_description">保持与收件箱中继的持续连接以便即时发送通知。 显示正在进行的通知。使用更多电量,但确保您永远不会错过消息。</string>
|
||||
<string name="battery_optimization_title">电池优化已启用</string>
|
||||
<string name="battery_optimization_description">Android 可能会限制后台中继连接。禁用针对Amethyst电池优化以确保可靠的通知。</string>
|
||||
<string name="battery_optimization_fix_now">立即修复</string>
|
||||
<string name="reply_notify">通知:</string>
|
||||
<string name="channel_list_join_conversation">加入对话</string>
|
||||
<string name="channel_list_user_or_group_id">用户或群组 ID</string>
|
||||
|
||||
Reference in New Issue
Block a user