... if term_low in c:
                snippet = msg.get("content", "").strip().replace("\n", " ")
                if snippet:
                    s = snippet if len(snippet) <= 280 else snippet[:277] + "..."
                    if s not in hits:
                        hits.append(s)
                if len(hits) >= max_snippets:
                    break
        if len(hits) >= max_snippets:
           ...