---
# System prepended metadata

title: Release 1.16.8

---

# Release 1.16.8

## Services

* admin-service
* [done] core service
* [done] main worker
* [done] event trigger
* [done] user app worker
* [done] redis-rabbitmq-handler
* api-service

## API Changes

### GET /platforms

> Zapier

GET /platforms?platformTypeIds=3
response: 
```
{ data: [] }
```

## DB updates

```
[done]db.platforms.updateMany({},{ $set: { platformTypeIds: [] } });
[done]db.platforms.updateMany({ platformId: { $in: [1,3,2,5]}},{ $addToSet: { platformTypeIds: 1 } });
[done]db.platforms.updateMany({ platformId: { $in: [1,3]}},{ $addToSet: { platformTypeIds: 2 } });
[done]db.platforms.updateMany({ platformId: { $in: [1,3]}},{ $addToSet: { platformTypeIds: 3 } });
[done]db.platformTypes.insertMany([
    {
        platformTypeId: 1,
        name: 'external',
        
        Reference: 'external'
    },
    {
        platformTypeId: 2,
        name: 'universal',
        systemReference: 'universal'
    },
    {
        platformTypeId: 3,
        name: 'TODO: 3rd party system external platforms invite posibile',
        systemReference: 'inviteAvailableFor3rdPartySystem'
    }   
]);
db.getCollection("systemFunctions").insert({
    "systemFunctionId": 607,
    "parentId": 57,
    "function": "/sessions/:sessionId",
    "systemApplicationId": 0,
    "description": "//TODO",
    "permissionLevel": "workspace",
    "availablePermissionTypeIds": [
        1
    ],
    "name": "/sessions/:sessionId"
})
db.getCollection("systemFunctions").insert({
    "systemFunctionId": 614,
    "parentId": 107,
    "function": "/facebook/messenger/limitations",
    "systemApplicationId": 5,
    "description": "Return limitations of paltform",
    "permissionLevel": "public",
    "availablePermissionTypeIds": [
        1
    ],
    "name": "/facebook/messenger/limitations"
})

db.getCollection("systemFunctions").insert({
    "systemFunctionId": 615,
    "parentId": 107,
    "function": "/twilio/sms/limitations",
    "systemApplicationId": 5,
    "description": "Return limitations of paltform",
    "permissionLevel": "public",
    "availablePermissionTypeIds": [
        1
    ],
    "name": "/twilio/sms/limitations"
})
db.getCollection("systemFunctions").insert({
    "systemApplicationId": 2,
    "systemFunctionId": 610,
    "function": "/sessions/:sessionId/entities/:entityId",
    "description": "Update eny entity in session",
    "parentId": 130,
    "permissionLevel": "system",
    "availablePermissionTypeIds": [
        3
    ],
    "name": "/sessions/:sessionId/entities/:entityId",
    "paths": []
})
[done] db.getCollection("channelMembershipTypes").insert({
    "description": "Universal session",
    "systemReference": "universalSession",
    "channelMembershipTypeId": 3
});
db.eventTriggers.updateOne(
{ "eventTriggerId": -988 },
{
    $push: {
        actions: {
                "arguments": [
                    {
                        "collectionName": "{collections.sessions.inactivitySubscription.name}",
                        "queryMethod": "deleteMany",
                        "queryObject": {
                            "sessionId": "{currentSessionId}"
                        }
                    }
                ],
                "id": 4
            },
    }
})

db.getCollection("localizations").insert({
    "languages": [
        {
            "code": "en",
            "text": "Universal Session Instruction 1"
        }
    ],
    "customId": "universalSessionInstruction", 
    "moduleId": "5d8c5a61d0cc39c8b46e9a76"
})
[done]db.platforms.updateMany(
    { "platformId": { $in: [1, 3] } },
    {
        $set: {
            limitations: {
                idleTimeout: 240
            }
        }
    })
[done]db.getCollection("events").insert({
    "name": "Rake user app. First join to universal sessions",
    "customId": "7",
    "moduleId": "5d8c5a61d0cc39c8b46e9a76",
    "systemEventId": -177,
})
[done]db.getCollection("events").insert({
    "name": "Universal session. Spam message response",
    "customId": "8",
    "moduleId": "5d8c5a61d0cc39c8b46e9a76",
    "systemEventId": 114
})
db.eventTriggers.updateOne(
    { eventTriggerId: 56 },
    { $addToSet: { eventIds: 115 } }
);
db.eventTriggers.update(
    { eventTriggerId: 56 },
    { 
        $addToSet: { eventIds: 114 }
        $set: {
            "actions": [
                {
                    "id": 0,
                    "arguments": [
                        "{rawMessage.toEntityId}",
                        {
                            "type": "message",
                            "text": "{rawMessage.text}",
                            "tokens": "{rawMessage.tokens}"
                        },
                        "{rawMessage.toPlatformId}",
                        {
                            "sessionId": "{currentSessionId}",
                            "chatId": "{rawMessage.chatId}",
                            "platformBotMongoId": "{rawMessage.platformBotMongoId}",
                            "ignoredStages": "{rawMessage.ignoredStages}"
                        }
                    ]
                }
            ],
            "filters": [{
                "filterOperatorId": 0,
                "filterId": 6,
                "arguments": [{
                    "collectionName": "{collection.messages.rawMessages.name}",
                    "queryObject": {
                        "rawMessage.sessionId":  "{currentSessionId}",
                        "rawMessage.systemEventId" : "{currentSystemEventId}",
                        "rawMessage.toEntityId": '{rawMessage.toEntityId}',
                        "rawMessage.toPlatformId": '{rawMessage.toPlatformId}',
                    }
                }]
            },1]
        }
    }
);
db.getCollection("eventTriggerFilters").insert({
    "filterId": 5,
    "name": "Index of event"
})
db.sessions.updateMany(
    { conversationFlow: 'directMessaging' },
    { 
        $set: { 'conversationFlow.$': '5d8c5a61d0cc39c8b46e9a76.directMessaging'
        }
    }
)
db.getCollection("platforms").insert({
    "__v": 0,
    "icon": " <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"226px\" width=\"224px\" version=\"1.1\" viewBox=\"0 0 224 226\">  <defs>   <linearGradient id=\"a\" y1=\"6.76%\" x2=\"50%\" x1=\"50%\" y2=\"95.6%\">    <stop stop-color=\"#00C6FF\" offset=\"0\"/>    <stop stop-color=\"#0068FF\" offset=\"1\"/>   </linearGradient>  </defs> <path fill=\"url(#a)\" d=\"m41.255 185.52v40.2l37.589-21.37c10.478 3.02 21.616 4.65 33.156 4.65 61.86 0 112-46.79 112-104.5 0-57.714-50.14-104.5-112-104.5-61.856 0-112 46.786-112 104.5 0 32.68 16.078 61.86 41.255 81.02z\"/> <path fill=\"#fff\" d=\"m100.04 75.878l-60.401 63.952 54.97-30.16 28.721 30.16 60.06-63.952-54.36 29.632-28.99-29.632z\"/> </svg>",
    "logo": " <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"226px\" width=\"224px\" version=\"1.1\" viewBox=\"0 0 224 226\">  <defs>   <linearGradient id=\"a\" y1=\"6.76%\" x2=\"50%\" x1=\"50%\" y2=\"95.6%\">    <stop stop-color=\"#00C6FF\" offset=\"0\"/>    <stop stop-color=\"#0068FF\" offset=\"1\"/>   </linearGradient>  </defs> <path fill=\"url(#a)\" d=\"m41.255 185.52v40.2l37.589-21.37c10.478 3.02 21.616 4.65 33.156 4.65 61.86 0 112-46.79 112-104.5 0-57.714-50.14-104.5-112-104.5-61.856 0-112 46.786-112 104.5 0 32.68 16.078 61.86 41.255 81.02z\"/> <path fill=\"#fff\" d=\"m100.04 75.878l-60.401 63.952 54.97-30.16 28.721 30.16 60.06-63.952-54.36 29.632-28.99-29.632z\"/> </svg>",
    "name": "WhatsApp",
    "platformId": 12,
    "reportColor": "#00b9ff",
    "systemName": "whatsapp",
    "userApp": {
        "name": "WhatsApp",
        "icon": "<?xml version=\"1.0\"?><svg xmlns=\"http://www.w3.org/2000/svg\" height=\"512px\" viewBox=\"0 0 512 512.00016\" width=\"512px\"><g><path d=\"m256 0c-138.777344 0-256 106.414062-256 241 0 72.125 34.800781 138.085938 91 183v73c0 5.226562 2.71875 10.074219 7.179688 12.800781 4.410156 2.691407 9.960937 2.957031 14.664062.546875l74.453125-38.160156c22.273437 5.847656 45.355469 8.8125 68.703125 8.8125 141.160156 0 256-107.664062 256-240 0-134.652344-117.296875-241-256-241zm0 451c-22.574219 0-44.855469-3.109375-66.21875-9.238281-3.664062-1.054688-7.589844-.671875-10.976562 1.066406l-57.804688 29.628906v-55.804687c0-4.71875-2.21875-9.160156-5.988281-11.992188-54.027344-40.601562-85.011719-100.253906-85.011719-163.660156 0-116.347656 101.382812-211 226-211s226 94.652344 226 211c0 115.792969-101.382812 210-226 210zm0 0\" data-original=\"#000000\" class=\"active-path\" data-old_color=\"#000000\" fill=\"currentColor\"/><path d=\"m399.292969 152.585938-110.332031 55.164062-52.355469-52.355469c-3.015625-3.015625-7.171875-4.609375-11.433594-4.371093-4.261719.238281-8.21875 2.277343-10.882813 5.609374l-120 150c-4.402343 5.5-4.382812 13.320313.046876 18.800782 4.429687 5.476562 12.074218 7.132812 18.375 3.984375l110.328124-55.164063 52.355469 52.355469c3.015625 3.015625 7.167969 4.605469 11.4375 4.367187 4.257813-.234374 8.214844-2.273437 10.882813-5.605468l120-150c4.398437-5.5 4.378906-13.324219-.050782-18.800782-4.425781-5.476562-12.070312-7.136718-18.371093-3.984374zm-114.535157 140.957031-48.152343-48.148438c-4.566407-4.566406-11.539063-5.699219-17.3125-2.8125l-58.917969 29.457031 66.867188-83.582031 48.152343 48.148438c4.5625 4.566406 11.539063 5.699219 17.3125 2.8125l58.917969-29.457031zm0 0\" data-original=\"#000000\" class=\"active-path\" data-old_color=\"#000000\" fill=\"currentColor\"/></g> </svg>"
    },
    "takeoverEligible": false,
    "platformTypeIds": [
        1,
        2,
        3
    ]
})
db.systemFunctions.update({"systemFunctionId": 605, }, {    
$set: {
        "function": "/messages",
        "name": "/messages"
    }
})
db.systemFunctions.update({"systemFunctionId": 100 }, {
    $set: {
        "systemApplicationId": 0,
        "function": "/platforms/twilio/projects/:twilioProjectId/phone-numbers",
        "description": "Get list of active, in use or purchasable phones numbers by twilio project",
        "parentId": 96,
        "permissionLevel": "workspace",
        "availablePermissionTypeIds": [
            1
        ],
        "name": "/platforms/twilio/projects/:twilioProjectId/phone-numbers"
    }
});
db.systemFunctions.update({ "systemFunctionId": 616, }, {    
$set: {
        "systemFunctionId": 616,
        "parentId": 107,
        "function": "/sessions/:sessionId/invitations/status",
        "systemApplicationId": 0,
        "description": "Update invitation status in universal session",
        "permissionLevel": "public",
        "availablePermissionTypeIds": [
            3
        ],
        "name": "/sessions/:sessionId/invitations/status"
    }
})
db.getCollection("systemConfigs").update({ nodeEnv: 'prod' },
    {
        $set: {
            "templates.admin.invitation.universalPlatform": {
                "templateId": "d-36c03f16e2b84d2ea773342bb1d47b8b",
                "header": {
                    "logo": "",
                    "title": "Join the channel"
                },
                "receipt": true,
                "body": {
                    "p1": "You've been invited to join the {{sessions.channel.name}} channel, a private universal messaging channel hosted by Rake.",
                    "p2": "Rake hosts Universal Channels so everyone can use their preferred messaging app and collaborate in real-time.  You may join this channel via one of the supported messaging platforms listed below.",
                    "join-header": "This invitation comes from {{invitor_entity.firstName}} {{invitor_entity.lastName}} who is a member of the {{workspace.name}} workspace.",
                    "channel_inviteeEmail": "jim.wood@rake.ai",
                    "channelName-header": "Join the:",
                    "channelName": "{{channelName}}",
                    "rake-join-link": "https://rake.page.link/abcdef1234",
                    "rakeLogo": "http://cdn.mcauto-images-production.sendgrid.net/c57a7072e7f7ee63/98545032-0e47-4b8b-8c1b-0ff6bb63a9de/20x20.png",
                    "p3": "If you need further assistance, please contact {{invitor_entity.firstName}} {{invitor_entity.lastName}} via email at {{invitor_entity.email}}.",
                    "signature": "Let's get the conversation started!",
                    "signatureImage": "http://cdn.mcauto-images-production.sendgrid.net/c57a7072e7f7ee63/a96ef31e-7db3-4073-b972-1687188cf8fa/194x36.png"
                },
                "universalPlatforms": [
                    {
                        "platformId": 3,
                        "platform_genericName": "Facebook Messenger",
                        "platform_buttonText": "",
                        "platform_genericLogo": "http://cdn.mcauto-images-production.sendgrid.net/c57a7072e7f7ee63/85547599-8184-4468-bd4a-08e637f980e8/20x20.png",
                        "joinPageLink": "https://rake.page.link/abcdef-fbmessenger"
                    },
                    {
                        "platformId": 12,
                        "platform_genericName": "WhatsApp",
                        "platform_buttonText": "",
                        "platform_genericLogo": "http://cdn.mcauto-images-production.sendgrid.net/c57a7072e7f7ee63/c3371d22-63ec-4575-905d-f7bb755d6244/20x20.png",
                        "joinPageLink": "https://rake.page.link/abcdef-whatsapp"
                    },
                    {
                        "platformId": 1,
                        "platform_genericName": "SMS",
                        "platform_buttonText": "+1 602 555 1212",
                        "platform_genericLogo": "http://cdn.mcauto-images-production.sendgrid.net/c57a7072e7f7ee63/a25bc7e6-2beb-4ed9-95fb-cf0c9e9c3a6b/20x20.png",
                        "joinPageLink": "https://rake.page.link/abcdef1234-sms16025551212"
                    }
                ],
                "footer": {
                    "company": "Rake LLC | 19740 Governors Highway, Suite 115 | Flossmoor, IL 60422 USA",
                    "website": "https://rake.ai"
                }
            }
        }
    })
```

### Indexes

```
db.getCollection("rawMessages")
    .createIndex({ 
        "rawMessage.systemEventId": 1,
        "rawMessage.sessionId": 1
    })
```