Merge branch 'test' into feature/qbo
This commit is contained in:
@@ -12,14 +12,24 @@ query FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID(
|
||||
}
|
||||
`;
|
||||
|
||||
exports.INSERT_MESSAGE = `
|
||||
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid) {
|
||||
update_conversations(where: {id: {_eq: $conversationid}}, _set: {archived: false}) {
|
||||
affected_rows
|
||||
exports.UNARCHIVE_CONVERSATION = `
|
||||
mutation UNARCHIVE_CONVERSATION($id: uuid!) {
|
||||
update_conversations_by_pk(pk_columns: {id: $id}, _set: {archived: false}) {
|
||||
id
|
||||
}
|
||||
insert_messages(objects: $msg) {
|
||||
}
|
||||
`;
|
||||
|
||||
exports.INSERT_MESSAGE = `
|
||||
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid!) {
|
||||
update_conversations_by_pk(pk_columns: {id: $conversationid}, _set: {archived: false}) {
|
||||
id
|
||||
}
|
||||
insert_messages(objects: $msg) {
|
||||
returning {
|
||||
conversation {
|
||||
id
|
||||
archived
|
||||
bodyshop {
|
||||
associations(where: {active: {_eq: true}}) {
|
||||
user {
|
||||
|
||||
@@ -55,7 +55,7 @@ exports.send = (req, res) => {
|
||||
: [],
|
||||
};
|
||||
gqlClient
|
||||
.request(queries.INSERT_MESSAGE, { msg: newMessage })
|
||||
.request(queries.INSERT_MESSAGE, { msg: newMessage, conversationid })
|
||||
.then((r2) => {
|
||||
//console.log("Responding GQL Message ID", JSON.stringify(r2));
|
||||
logger.log("sms-outbound-success", "DEBUG", req.user.email, null, {
|
||||
|
||||
Reference in New Issue
Block a user