hermes-agent/plugins/platforms
Teknium ba49fb51a5
fix(discord): hydrate channel context when replying to a message (#49212)
* fix(discord): hydrate channel context when replying to a message

Replying to a message in a free-response (non-mention, threads-off)
channel previously received only the 500-char "[Replying to: ...]"
snippet — the history-backfill gate fired only for mention-gated
channels and threads, so a reply got no surrounding channel context.

Replies now route through the same _fetch_channel_context hydration
that threads use. When the user replied to a specific (often older)
message, a reply-anchored window is scanned ending at that message so
the agent sees the exchange around what was pointed at, even when the
target sits before the self-message partition. The two windows are
merged chronologically and de-duplicated by message id.

Also hardens the recent-window scan to skip non-conversational status
bumps before the self-message partition check, and makes author-name
resolution defensive against partial/deleted authors.

* fix(discord): duck-type reply-target resolution instead of isinstance(discord.Message)

The e2e suite stubs the discord module, so discord.Message is a MagicMock
and isinstance(_resolved, discord.Message) raises 'isinstance() arg 2 must
be a type'. Any object with an int .id works as a scan anchor, so resolve
the reply target by duck-typing on .id and fall back to a _Snowflake from
the reference message_id.
2026-06-19 12:03:08 -07:00
..
discord fix(discord): hydrate channel context when replying to a message (#49212) 2026-06-19 12:03:08 -07:00
google_chat fix: guard int(os.getenv()) casts against malformed env vars (#40598) 2026-06-07 06:14:24 -07:00
homeassistant refactor(gateway): migrate Home Assistant adapter to bundled plugin 2026-06-06 11:46:24 -07:00
irc fix: guard int(os.getenv()) casts against malformed env vars (#40598) 2026-06-07 06:14:24 -07:00
line fix(line): map inbound message types to the correct MessageType 2026-06-04 21:55:20 -07:00
mattermost fix(mattermost): preserve thread-local delivery hygiene 2026-06-15 15:06:23 -07:00
ntfy test(ntfy): cover echo-tag filter; tag standalone send path 2026-05-29 13:17:46 -07:00
photon fix(photon): preserve text in mixed iMessage attachments (salvage #46513) (#46818) 2026-06-17 16:14:24 -05:00
raft fix(raft): set stdin=DEVNULL on bridge subprocess 2026-06-19 07:52:37 -07:00
simplex fix(gateway): classify SimpleX non-image/non-audio files as DOCUMENT 2026-06-12 01:07:50 -07:00
teams fix(teams): package Microsoft Teams SDK as an installable extra (salvage #43945) (#46764) 2026-06-15 14:35:15 -04:00