Function
moveThreadToChannel
({
threadId,
channelId,
}: {
threadId: string;
channelId: string;
})
Source from the content-addressed store, hash-verified
| 23 | allUsers: SerializedUser[]; |
| 24 | }) { |
| 25 | const moveThreadToChannel = ({ |
| 26 | threadId, |
| 27 | channelId, |
| 28 | }: { |
| 29 | threadId: string; |
| 30 | channelId: string; |
| 31 | }) => { |
| 32 | setThreads( |
| 33 | threads.filter((thread) => { |
| 34 | if (thread.id === threadId && thread.channelId !== channelId) { |
| 35 | return false; |
| 36 | } |
| 37 | return true; |
| 38 | }) |
| 39 | ); |
| 40 | |
| 41 | return api.moveThreadToChannelRequest({ |
| 42 | threadId, |
| 43 | channelId, |
| 44 | communityId: currentCommunity.id, |
| 45 | }); |
| 46 | }; |
| 47 | |
| 48 | const moveMessageToChannel = ({ |
| 49 | messageId, |
Tested by
no test coverage detected