diff --git a/internal/channels/feishu/bot.go b/internal/channels/feishu/bot.go index 38206db2..62809d00 100644 --- a/internal/channels/feishu/bot.go +++ b/internal/channels/feishu/bot.go @@ -277,7 +277,7 @@ func (c *Channel) handleMessageEvent(ctx context.Context, event *MessageEvent) { } } -const replyContextMaxLen = 500 +const replyContextMaxLen = 2000 // fetchReplyContext fetches the parent message content and returns a formatted // reply context string + any downloaded media from the parent message. diff --git a/internal/store/pg/teams_tasks_activity.go b/internal/store/pg/teams_tasks_activity.go index d8d8de6b..69bfe801 100644 --- a/internal/store/pg/teams_tasks_activity.go +++ b/internal/store/pg/teams_tasks_activity.go @@ -132,7 +132,7 @@ func (s *PGTeamStore) RecordTaskEvent(ctx context.Context, event *store.TeamTask func (s *PGTeamStore) ListTaskEvents(ctx context.Context, taskID uuid.UUID) ([]store.TeamTaskEventData, error) { tid := tenantIDForInsert(ctx) rows, err := s.db.QueryContext(ctx, - `SELECT id, task_id, event_type, actor_type, actor_id, data, created_at + `SELECT id, task_id, event_type, actor_type, actor_id, COALESCE(data, '{}'), created_at FROM team_task_events WHERE task_id = $1 AND tenant_id = $2 ORDER BY created_at ASC`, taskID, tid) @@ -160,7 +160,7 @@ func (s *PGTeamStore) ListTeamEvents(ctx context.Context, teamID uuid.UUID, limi } tid := tenantIDForInsert(ctx) rows, err := s.db.QueryContext(ctx, - `SELECT e.id, e.task_id, e.event_type, e.actor_type, e.actor_id, e.data, e.created_at + `SELECT e.id, e.task_id, e.event_type, e.actor_type, e.actor_id, COALESCE(e.data, '{}'), e.created_at FROM team_task_events e JOIN team_tasks t ON t.id = e.task_id WHERE t.team_id = $1 AND t.tenant_id = $4