justemu
4aa793345e
fix(matrix): use member_count as DM signal for named DM rooms
...
Most Matrix clients auto-set a room name when creating a DM (e.g.
"Alice & Bot" from participant display names), so the old
`is_direct and not has_explicit_name` heuristic classified virtually
all client-created DM rooms as "room", forcing require_mention gating
in legitimate one-on-one DMs.
member_count is now the primary DM signal: <=2 members means the room
is necessarily a 1:1 conversation, regardless of m.direct or an explicit
name. A room that grew to 3+ members but is still in stale m.direct is
still classified as a room (conflict flag set). Falls back to the
m.direct + name heuristic when the count is unavailable.
Also hardens _get_room_member_count with a joined_members API fallback
when the cache-backed state_store is empty.
Salvaged from #48554 by @justemu onto the current plugin adapter path
(gateway/platforms/matrix.py -> plugins/platforms/matrix/adapter.py).
Fixes #48551
2026-06-23 23:57:38 -07:00
..
2026-06-21 16:39:02 -07:00
2026-05-18 10:14:38 -07:00
2026-06-23 23:52:28 -07:00
2026-06-23 10:32:27 -07:00
2026-06-23 19:05:22 -05:00
2026-06-22 09:57:16 -07:00
2026-06-23 23:39:22 -07:00
2026-06-21 19:05:27 -07:00
2026-06-20 10:26:45 -07:00
2026-06-02 12:37:40 -04:00
2026-06-23 23:57:38 -07:00
2026-06-23 23:49:37 -07:00
2026-06-18 16:04:58 -05:00
2026-06-22 19:16:47 -05:00
2026-06-06 11:46:24 -07:00
2026-06-19 13:53:39 +05:30
2026-06-23 23:39:22 -07:00
2026-06-16 13:09:40 -07:00
2026-06-24 02:56:56 +05:30
2026-06-08 15:21:28 -07:00
2026-06-22 12:14:30 -07:00
2026-05-28 22:26:25 -07:00
2026-06-23 23:27:48 -07:00
2026-06-23 23:29:45 -07:00
2026-06-01 19:52:28 -07:00
2026-06-19 07:46:33 -07:00
2026-06-15 11:55:02 -04:00
2026-06-13 14:50:05 -07:00
2026-05-28 22:26:25 -07:00
2026-06-06 18:33:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 21:43:59 -07:00
2026-06-24 04:16:54 +05:30
2026-05-28 22:26:25 -07:00
2026-06-19 18:06:38 -04:00
2026-06-21 12:09:16 -07:00
2026-06-17 18:48:35 -05:00
2026-06-03 07:32:00 +07:00
2026-06-14 00:27:59 -04:00
2026-06-10 15:32:34 +10:00
2026-06-01 16:06:44 +10:00
2026-06-19 10:52:16 +10:00
2026-06-01 13:32:55 +10:00
2026-06-05 02:54:34 -07:00
2026-06-10 17:37:34 -07:00
2026-05-25 15:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 06:32:42 -07:00
2026-06-23 23:29:45 -07:00
2026-06-21 14:06:39 -06:00
2026-06-20 10:26:45 -07:00
2026-05-28 21:40:39 -07:00
2026-05-27 14:31:55 -07:00
2026-06-19 17:36:18 +05:30
2026-06-08 09:35:22 -07:00
2026-05-29 22:29:48 -07:00
2026-05-27 10:49:33 -07:00
2026-06-01 20:13:42 -07:00
2026-06-08 02:18:21 -07:00
2026-06-18 22:11:35 +05:30
2026-06-23 21:33:08 -07:00
2026-06-18 16:26:34 +07:00
2026-06-23 10:38:15 -07:00
2026-06-18 14:14:41 +10:00
2026-06-14 17:34:11 +07:00
2026-05-27 13:55:51 -07:00
2026-05-28 22:26:25 -07:00
2026-06-13 05:19:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 23:22:10 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 18:04:47 -07:00
2026-06-21 16:33:58 +05:30
2026-05-28 22:26:25 -07:00
2026-06-09 03:17:12 -07:00
2026-06-18 09:16:40 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 09:35:22 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 12:11:54 -07:00
2026-06-12 13:42:42 -04:00
2026-06-08 07:03:12 -07:00
2026-06-24 04:16:54 +05:30
2026-06-09 18:49:08 -05:00
2026-06-14 03:20:21 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 05:01:27 -07:00
2026-06-03 06:36:46 -07:00
2026-06-23 11:32:00 -07:00
2026-06-12 08:30:06 -05:00
2026-06-18 05:41:23 -07:00
2026-06-23 23:43:24 -07:00
2026-06-03 12:00:27 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 02:06:47 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 17:49:38 -07:00