MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / markUserThreadStatuses

Function markUserThreadStatuses

apps/web/ui/ChannelView/index.tsx:279–304  ·  view source on GitHub ↗
(
    threadId: string,
    {
      muted,
      read,
      reminder,
      reminderType,
    }: {
      muted: boolean;
      read: boolean;
      reminder: boolean;
      reminderType?: ReminderTypes;
    }
  )

Source from the content-addressed store, hash-verified

277 }
278
279 function markUserThreadStatuses(
280 threadId: string,
281 {
282 muted,
283 read,
284 reminder,
285 reminderType,
286 }: {
287 muted: boolean;
288 read: boolean;
289 reminder: boolean;
290 reminderType?: ReminderTypes;
291 }
292 ) {
293 debouncedUpserUserThreadStatus({
294 communityId: currentCommunity.id,
295 threadIds: [threadId],
296 muted,
297 read,
298 reminder,
299 reminderType,
300 });
301 setThreads((threads) => {
302 return threads.filter((thread) => thread.id !== threadId);
303 });
304 }
305
306 async function muteThread(threadId: string) {
307 Toast.info('Thread was muted.');

Callers 6

onKeyUpFunction · 0.85
muteThreadFunction · 0.85
unmuteThreadFunction · 0.85
readThreadFunction · 0.85
unreadThreadFunction · 0.85
onRemindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected