Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Conditionally set chat declaration (#4122)

authored by

Eric Bailey and committed by
GitHub
5771ff4b f52db843

+12 -9
+12 -9
src/state/session/agent.ts
··· 154 154 id: TID.nextStr(), 155 155 }, 156 156 ]) 157 - await agent.api.com.atproto.repo.putRecord({ 158 - repo: account.did, 159 - collection: 'chat.bsky.actor.declaration', 160 - rkey: 'self', 161 - record: { 162 - $type: 'chat.bsky.actor.declaration', 163 - allowIncoming: getAge(birthDate) < 18 ? 'none' : 'following', 164 - }, 165 - }) 157 + 158 + if (getAge(birthDate) < 18) { 159 + await agent.api.com.atproto.repo.putRecord({ 160 + repo: account.did, 161 + collection: 'chat.bsky.actor.declaration', 162 + rkey: 'self', 163 + record: { 164 + $type: 'chat.bsky.actor.declaration', 165 + allowIncoming: 'none', 166 + }, 167 + }) 168 + } 166 169 }) 167 170 } catch (e: any) { 168 171 logger.error(e, {