caelum0x b2487e7740 fix: skip workspace members with no Raven User record in Open channels
raven.api.chat.get_channel_members built each Open-channel member's row by
indexing straight into the Raven User lookup result without checking it was
found, unlike the identical branch 10 lines below for non-Open channels. A
workspace member whose Raven User record is missing (e.g. left behind by a
direct cleanup that skipped RavenUser.on_trash's own cascade) crashes the
whole whitelisted endpoint with AttributeError instead of just being omitted.

Extracted the row-building into build_member_entry(), which returns None for
an unmatched member so both branches skip it the same way. Added
raven/tests/test_chat_channel_members.py (pure-function coverage plus an
IntegrationTestCase reproducing the stale-membership state) following this
repo's existing test conventions.

Verified: apps/web vitest (480/480) and tsc -b are unaffected and pass; the
new Python tests need a Frappe bench (DB-backed test runner) this sandbox
does not have, so they are written to the repo's established
IntegrationTestCase pattern but not executed here.
2026-10-21 03:59:57 +03:00
..
2023-02-10 11:07:25 +05:50
2026-09-18 23:49:07 +05:30
2026-09-01 14:19:03 +05:30
2026-09-30 17:41:55 +05:30
2023-02-10 19:26:28 +05:30
2026-10-17 23:29:54 +05:30
2026-10-11 05:09:02 +05:30
2024-08-28 20:23:49 +05:30
2026-07-13 05:45:05 +05:30
2026-09-01 14:19:03 +05:30
2024-03-16 22:19:32 +05:30