3 #include <server/chat.qh>
5 var void MX_Handle(int buf, string ancestor)
7 string type = json_get(buf, strcat(ancestor, ".type"));
9 case "m.room.message": {
10 string msgtype = json_get(buf, strcat(ancestor, ".content.msgtype"));
13 string sender = json_get(buf, strcat(ancestor, ".sender"));
14 string body = json_get(buf, strcat(ancestor, ".content.body"));
15 if (sender != matrix_user && body) Say(NULL, false, NULL, body, false);