further social improvements, client-render edge cases

This commit is contained in:
41666 2019-03-21 08:13:58 -05:00
parent dd07e6bac4
commit 1c784d0605
4 changed files with 9 additions and 7 deletions

View file

@ -26,16 +26,22 @@ export default ($: AppContext) => ({
const { userId } = (ctx.session: { userId: string })
const srv = $.discord.client.guilds.get(id)
if (srv == null) {
return { err: 'not_found' }
}
if (userId == null) {
return {
id: id,
server: $.P.serverSlug(srv)
}
}
let gm
if (srv.members.has(userId)) {
gm = $.discord.gm(id, userId)
} else if ($.discord.isRoot(userId)) {
// gm = $.discord.fakeGm({ id: userId })
gm = $.discord.fakeGm({ id: userId })
}
if (gm == null) {