Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/pos-modules.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"modules": {
"profile": "1.1.0",
"user": "3.0.7"
"profile": "1.1.0"
}
}
}
4 changes: 2 additions & 2 deletions app/pos-modules.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"modules": {
"profile": "1.1.0",
"user": "3.0.7",
"user": "3.0.8",
"core": "1.5.5"
}
}
}
1 change: 1 addition & 0 deletions modules/chat/public/graphql/records/search.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ query records_count(
records(
per_page: 1
filter: {
table: { value: "modules/profile/profile" }
properties: [
{ name: "uuid", value: $uuid }
]
Expand Down
12 changes: 8 additions & 4 deletions modules/chat/public/views/pages/inbox.html.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion modules/chat/template-values.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}