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

Function findOrCreateFeedChannel

apps/web/services/feed/notifyFeed.ts:44–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44async function findOrCreateFeedChannel() {
45 let channel = await prisma.channels.findUnique({
46 where: { id: config.linen.feedChannelId },
47 });
48 if (!channel) {
49 channel = await prisma.channels.create({
50 data: {
51 channelName: 'feed',
52 id: config.linen.feedChannelId,
53 type: 'PUBLIC',
54 viewType: 'CHAT',
55 account: {
56 connectOrCreate: {
57 where: { id: config.linen.communityId },
58 create: { id: config.linen.communityId },
59 },
60 },
61 },
62 });
63 }
64 return channel;
65}
66
67async function findOrCreateLinenBot() {
68 let linenBot = await prisma.users.findUnique({

Callers 1

notifyFeedFunction · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected