diff --git a/api/models/thread.js b/api/models/thread.js index 980822088b..137e6d657a 100644 --- a/api/models/thread.js +++ b/api/models/thread.js @@ -325,7 +325,7 @@ export const getViewableParticipantThreadsByUser = async ( getParticipantCommunityIds, ]); - const participantThreadIds = participantChannelIds.map(c => c.threadId); + const participantThreadIds = participantChannelIds.map(c => c && c.threadId); const distinctParticipantChannelIds = participantChannelIds .map(c => c.channelId) .filter((x, i, a) => a.indexOf(x) === i); diff --git a/api/package.json b/api/package.json index bfae5ea052..2791dfb2fc 100644 --- a/api/package.json +++ b/api/package.json @@ -74,7 +74,7 @@ "lodash.intersection": "^4.4.0", "longjohn": "^0.2.12", "markdown-draft-js": "^0.6.3", - "moment": "^2.22.2", + "moment": "^2.23.0", "node-env-file": "^0.1.8", "node-localstorage": "^1.3.1", "now-env": "^3.1.0", diff --git a/api/queries/directMessageThread/participants.js b/api/queries/directMessageThread/participants.js index c9deaac9de..ca4cd4d913 100644 --- a/api/queries/directMessageThread/participants.js +++ b/api/queries/directMessageThread/participants.js @@ -5,14 +5,14 @@ import { signUser } from 'shared/imgix'; export default async ({ id }: { id: string }, _: any, ctx: GraphQLContext) => { const { loaders, user } = ctx; - if (!user || !user.id) return null; + if (!user || !user.id) return []; const canViewThread = await canViewDMThread(user.id, id, loaders); - if (!canViewThread) return null; + if (!canViewThread) return []; return loaders.directMessageParticipants.load(id).then(results => { - if (!results || results.length === 0) return null; + if (!results || results.length === 0) return []; return results.reduction.map(user => { return signUser(user); }); diff --git a/api/yarn.lock b/api/yarn.lock index 54990191a9..b76b33d700 100644 --- a/api/yarn.lock +++ b/api/yarn.lock @@ -6576,11 +6576,16 @@ moment-timezone@^0.5.23: dependencies: moment ">= 2.9.0" -"moment@>= 2.9.0", moment@^2.15.2, moment@^2.20.1, moment@^2.22.2: +"moment@>= 2.9.0", moment@^2.15.2, moment@^2.20.1: version "2.22.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= +moment@^2.23.0: + version "2.23.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225" + integrity sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA== + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" diff --git a/desktop/package.json b/desktop/package.json index 745d98e30d..dd5d4f510c 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -18,9 +18,9 @@ "electron-window-state": "^5.0.3" }, "devDependencies": { - "electron": "^3.0.11", + "electron": "^3.0.12", "electron-builder": "^20.38.3", - "nodemon": "^1.18.8", + "nodemon": "^1.18.9", "rimraf": "^2.6.2" }, "scripts": { diff --git a/desktop/yarn.lock b/desktop/yarn.lock index 1800ad50fe..778946e047 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -823,10 +823,10 @@ electron-window-state@^5.0.3: jsonfile "^4.0.0" mkdirp "^0.5.1" -electron@^3.0.11: - version "3.0.11" - resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.11.tgz#81e350db741fc0f2997ecb2fef5ed085ca42a723" - integrity sha512-galllxAMT3HLbHNR6i5WXrUXzsxzz0D1X6vu3uFMhofU9Wdbxv2w7BAD/BcYTT4c1bu4nZEgXO6AvHXjq0Sksw== +electron@^3.0.12: + version "3.0.12" + resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.12.tgz#7486ff1c60e9c22d8aadaee620695c42c9ddb2ac" + integrity sha512-stvGbqYzWv5qHHtjZZgA7gET3NPGLuxs68IHTrJqsqujQfXGkhMOh8tstpXl86kBdRpzZn7GaDlTWcgeFSmsPw== dependencies: "@types/node" "^8.0.24" electron-download "^4.1.0" @@ -1919,16 +1919,16 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -nodemon@^1.18.8: - version "1.18.8" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.8.tgz#eb4c0052dc81395bdc503f3c8ae3cba86ca7146a" - integrity sha512-CgC/JdCf+CT7Z+K6wWaV30t8GU1DPtXpr/6PuXC1/LboXCmUQNKOaz0AEMjoWDTt2AdHOBFxgv41dyC0i79SbA== +nodemon@^1.18.9: + version "1.18.9" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.9.tgz#90b467efd3b3c81b9453380aeb2a2cba535d0ead" + integrity sha512-oj/eEVTEI47pzYAjGkpcNw0xYwTl4XSTUQv2NPQI6PpN3b75PhpuYk3Vb3U80xHCyM2Jm+1j68ULHXl4OR3Afw== dependencies: chokidar "^2.0.4" debug "^3.1.0" ignore-by-default "^1.0.1" minimatch "^3.0.4" - pstree.remy "^1.1.3" + pstree.remy "^1.1.6" semver "^5.5.0" supports-color "^5.2.0" touch "^3.1.0" @@ -2285,10 +2285,10 @@ psl@^1.1.24: resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== -pstree.remy@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.4.tgz#a03d5dbc06ba639fb6dd4874644c4bad9882ec21" - integrity sha512-3kSyTN/iTJMxtL87idnFgTyOp2vQ6B/49QcHUO26kh2M2qahlUivFI1zWJ9FRFPoB+KgcP820JMOuIhkBJAP3Q== +pstree.remy@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.6.tgz#73a55aad9e2d95814927131fbf4dc1b62d259f47" + integrity sha512-NdF35+QsqD7EgNEI5mkI/X+UwaxVEbQaz9f4IooEmMUv6ZPmlTQYGjBPJGgrlzNdjSvIy4MWMg6Q6vCgBO2K+w== punycode@^1.4.1: version "1.4.1" diff --git a/shared/clients/group-messages.js b/shared/clients/group-messages.js index daf92baf87..0e5da2dcc9 100644 --- a/shared/clients/group-messages.js +++ b/shared/clients/group-messages.js @@ -59,7 +59,7 @@ export const sortAndGroupMessages = (messages: Array) => { */ const c = new Date(current.timestamp).getTime(); const p = new Date(previous.timestamp).getTime(); - return c > p + 21600000; + return c > p + 3600000; // one hour; }; // if we are evaulating a bubble from the same user diff --git a/src/components/fullscreenView/style.js b/src/components/fullscreenView/style.js index f3596be6a5..5bbf8a98f3 100644 --- a/src/components/fullscreenView/style.js +++ b/src/components/fullscreenView/style.js @@ -16,7 +16,6 @@ export const FullscreenViewContainer = styled.div` align-items: center; justify-content: flex-start; flex-direction: column; - align-items: center; z-index: ${zIndex.fullscreen}; overflow-y: scroll; -webkit-transform: translate3d(0, 0, 0); diff --git a/src/components/withCurrentUser/index.js b/src/components/withCurrentUser/index.js index 44caf92579..ce4dbee103 100644 --- a/src/components/withCurrentUser/index.js +++ b/src/components/withCurrentUser/index.js @@ -54,21 +54,10 @@ export const withCurrentUser = ( return ( {({ currentUser, isLoading }) => { - if (!currentUser) { - return ( - - ); - } - return ( diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js index 4d5b11e3a6..35b29a9516 100644 --- a/src/views/dashboard/style.js +++ b/src/views/dashboard/style.js @@ -183,7 +183,7 @@ export const CommunityListItem = styled.div` grid-auto-rows: 48px auto; grid-template-areas: 'icon title' 'menu menu'; min-height: 48px; - padding: 8px; + padding: 8px 16px; justify-items: start; align-items: center; cursor: pointer;