(self, message)
| 102 | |
| 103 | @deltachat.account_hookimpl |
| 104 | def ac_incoming_message(self, message): |
| 105 | if self.current_sent >= self.num_send: |
| 106 | self.report_func(self, ReportType.exit) |
| 107 | return |
| 108 | message.create_chat() |
| 109 | message.mark_seen() |
| 110 | self.log(f"incoming message: {message}") |
| 111 | |
| 112 | self.current_sent += 1 |
| 113 | # we are still alive, let's send a reply |
| 114 | if self.num_bigfiles and self.current_sent % (self.num_send / self.num_bigfiles) == 0: |
| 115 | message.chat.send_text(f"send big file as reply to: {message.text}") |
| 116 | msg = message.chat.send_file(self.account.bigfile) |
| 117 | else: |
| 118 | msg = message.chat.send_text(f"got message id {message.id}, small text reply") |
| 119 | assert msg.text |
| 120 | self.log(f"message-sent: {msg}") |
| 121 | self.report_func(self, ReportType.message_echo) |
| 122 | if self.current_sent >= self.num_send: |
| 123 | self.report_func(self, ReportType.exit) |
| 124 | return |
| 125 | |
| 126 | @deltachat.account_hookimpl |
| 127 | def ac_process_ffi_event(self, ffi_event): |
nothing calls this directly
no test coverage detected