However what you describe with !@ sounds very similar to what we do with !Well I knew about the friendica forums when I chose the Exclamation Mark syntax. This decision might come back to haunt me now ;-)
Apart from that, tootgroup.py is not really comparable. It is a script that runs independently from the Mastodon or Pleroma Server and just connects as a normal ActivityPub client.
I expect !@user@domain to be treated either as a regular mention with @, or as plaintext since the @ wouldn’t be prepended by non-text.It is mostly treated as plaintext. But the non-text before the @ is also not always required. ?@user@domain works but !@user@domain does not.
Can you give me a pointer to where this is handled in the friendica source? I'll try to get to the bottom of this. Thanks!