mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 08:11:09 +00:00
Fixed testing issue:
- We previously triggered expect(getMemberDisplayName).not.toHaveBeenCalled(); - We now only fetch the displayName when the message contains a formatted_body, as we only need to search those messages for mentions using displayName
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
ba1c08cd88
commit
82027b46f7
@@ -552,7 +552,9 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam
|
||||
resolveAgentRoute: core.channel.routing.resolveAgentRoute,
|
||||
});
|
||||
const agentMentionRegexes = core.channel.mentions.buildMentionRegexes(cfg, _route.agentId);
|
||||
const selfDisplayName = await getMemberDisplayName(roomId, selfUserId).catch(() => undefined);
|
||||
const selfDisplayName = content.formatted_body
|
||||
? await getMemberDisplayName(roomId, selfUserId).catch(() => undefined)
|
||||
: undefined;
|
||||
const { wasMentioned, hasExplicitMention } = resolveMentions({
|
||||
content,
|
||||
userId: selfUserId,
|
||||
|
||||
Reference in New Issue
Block a user