jjj333-p / spam-police

A matrix bot to monitor and respond to investment scam spamming across the matrix platform, for example in rooms with a permanently offline admin.
GNU Affero General Public License v3.0
21 stars 8 forks source link

element : after mentions makes bot think its a command #39

Closed jjj333-p closed 8 months ago

jjj333-p commented 10 months ago

image

{
  "content": {
    "body": "+ | Spam Police: ",
    "format": "org.matrix.custom.html",
    "formatted_body": "<a href=\"https://matrix.to/#/@anti-scam:matrix.org\">+ | Spam Police</a>: ",
    "msgtype": "m.text"
  },
  "origin_server_ts": 1694056007492,
  "sender": "@ghost:waffle.tech",
  "type": "m.room.message",
  "unsigned": {},
  "event_id": "$_-dwV2AdmEcP2mXFzXRr5yb1YmsJvWHWgNxC57ha3IQ",
  "room_id": "!JglTjYmZcLVE6tFH:pain.agency"
}

i think i need to adjust the parcing so that it looks if the mention is the only word, not if the message includes only the mention. just the : at the end of the mention throws it off

jjj333-p commented 8 months ago

so uh yeah i dont even wanna talk about it