(
ctx: TcContext<{
userId?: string;
groupId?: string;
converseId: string;
messageId: string;
}>
)
| 167 | } |
| 168 | |
| 169 | async removeMessage( |
| 170 | ctx: TcContext<{ |
| 171 | userId?: string; |
| 172 | groupId?: string; |
| 173 | converseId: string; |
| 174 | messageId: string; |
| 175 | }> |
| 176 | ) { |
| 177 | const { |
| 178 | userId = ctx.meta.userId, |
| 179 | groupId, |
| 180 | converseId, |
| 181 | messageId, |
| 182 | } = ctx.params; |
| 183 | |
| 184 | await this.adapter.model.remove({ |
| 185 | userId, |
| 186 | type: 'message', |
| 187 | payload: { |
| 188 | groupId, |
| 189 | converseId, |
| 190 | messageId, |
| 191 | }, |
| 192 | }); |
| 193 | |
| 194 | await this.notifyUsersInboxUpdate(ctx, [userId]); // not good, 后面最好修改为发送删除的项而不是所有 |
| 195 | |
| 196 | return true; |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * 获取用户收件箱中所有内容 |
nothing calls this directly
no test coverage detected