Exemplo n.º 1
0
 async def check(ev: EventBase, state):
     d = ev.get_dict()
     d["content"] = {
         "msgtype": "m.text",
         "body": d["content"]["body"].upper(),
     }
     return True, d
Exemplo n.º 2
0
 async def check_event_allowed(self, event: EventBase,
                               state: StateMap[EventBase]):
     d = event.get_dict()
     content = unfreeze(event.content)
     content["foo"] = "bar"
     d["content"] = content
     return d
Exemplo n.º 3
0
 async def check(
         ev: EventBase,
         state: StateMap[EventBase]) -> Tuple[bool, Optional[JsonDict]]:
     d = ev.get_dict()
     d["content"] = {
         "msgtype": "m.text",
         "body": d["content"]["body"].upper(),
     }
     return True, d
Exemplo n.º 4
0
 async def check(ev: EventBase, state):
     d = ev.get_dict()
     d["content"] = {"x": "y"}
     return d
Exemplo n.º 5
0
 async def check(
         ev: EventBase,
         state: StateMap[EventBase]) -> Tuple[bool, Optional[JsonDict]]:
     d = ev.get_dict()
     d["content"] = {"x": "y"}
     return True, d