fix invalid messages.id query

fixes CNVS-6169

test plan:
  * run specs

Change-Id: I3d293e0a4d8ce1d755f9ebb01dae5bf872e84db0
Reviewed-on: https://gerrit.instructure.com/28322
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>