diff --git a/app/pos-modules.json b/app/pos-modules.json index 1b69f3d..99d4d77 100644 --- a/app/pos-modules.json +++ b/app/pos-modules.json @@ -1,6 +1,5 @@ { "modules": { - "profile": "1.1.0", - "user": "3.0.7" + "profile": "1.1.0" } -} \ No newline at end of file +} diff --git a/app/pos-modules.lock.json b/app/pos-modules.lock.json index 4ad1870..3050b84 100644 --- a/app/pos-modules.lock.json +++ b/app/pos-modules.lock.json @@ -1,7 +1,7 @@ { "modules": { "profile": "1.1.0", - "user": "3.0.7", + "user": "3.0.8", "core": "1.5.5" } -} \ No newline at end of file +} diff --git a/modules/chat/public/graphql/records/search.graphql b/modules/chat/public/graphql/records/search.graphql index 7304979..d1f6e6a 100644 --- a/modules/chat/public/graphql/records/search.graphql +++ b/modules/chat/public/graphql/records/search.graphql @@ -4,6 +4,7 @@ query records_count( records( per_page: 1 filter: { + table: { value: "modules/profile/profile" } properties: [ { name: "uuid", value: $uuid } ] diff --git a/modules/chat/public/views/pages/inbox.html.liquid b/modules/chat/public/views/pages/inbox.html.liquid index 863c605..ef930b0 100644 --- a/modules/chat/public/views/pages/inbox.html.liquid +++ b/modules/chat/public/views/pages/inbox.html.liquid @@ -4,19 +4,23 @@ slug: inbox {% liquid function current_profile = 'modules/profile/helpers/current_profile' - # platformos-check-disable ConvertIncludeToRenderl, UnreachableCode + # platformos-check-disable ConvertIncludeToRender, UnreachableCode include 'modules/user/helpers/can_do_or_unauthorized', requester: current_profile, do: 'chat.inbox', return_url: '/' # platformos-check-enable ConvertIncludeToRender, UnreachableCode - function record = 'modules/chat/lib/queries/records/find_by_uuid', uuid: context.params['to_uuid'] + if context.params.to_uuid != blank + function record = 'modules/chat/lib/queries/records/find_by_uuid', uuid: context.params['to_uuid'] + endif assign object = null | hash_merge: to_id: record.id, conversation_id: context.params['conversation_id'] - function current_conversation = 'modules/chat/lib/commands/conversations/find_or_create', object: object, current_profile: current_profile + if record or context.params.conversation_id + function current_conversation = 'modules/chat/lib/commands/conversations/find_or_create', object: object, current_profile: current_profile + endif if current_conversation.valid == false assign current_conversation = null endif if current_conversation - function res = 'modules/chat/lib/commands/conversations/mark_read', conversation: current_conversation, participant_id: current_profile.id + function _res = 'modules/chat/lib/commands/conversations/mark_read', conversation: current_conversation, participant_id: current_profile.id endif function conversations = 'modules/chat/lib/queries/conversations/search_by_participant', participant_id: current_profile.id, limit: 20, page: 1 diff --git a/modules/chat/template-values.json b/modules/chat/template-values.json index 0408070..1e8872b 100644 --- a/modules/chat/template-values.json +++ b/modules/chat/template-values.json @@ -6,7 +6,7 @@ "dependencies": { "core": "^1.0.0", "profile": "^1.1.0", - "user": "^1.0.0", + "user": "^3.0.0", "common-styling": "0.0.4" } }