@coralproject/talk-plugin-custom-asset-id

1.1.0 • Public • Published

Talk Plugin Custom ID Assets

Thanks to The Register-Guard for agreeing to open source this plugin.

This plugin is designed to allow the embed for Talk to specify an Asset ID to lookup and if not found create with the given ID and URL. If the ID is not provided however, the url will be used instead and it will fall back to Talk assigning an ID.

Algorithm

Asset ID provided

Attempt to lookup Asset with the given ID, if found, return asset. If the asset is not found, create it with the url.

Asset ID not provided

Attempt to lookup Asset with the url, if found, return asset. If the asset is not found, create it with the url and assign a new ID.

Installation

Simply modify/create the plugins.json file to include it:

{
  "server": [
    // ...
    {"@coralproject/talk-plugin-custom-asset-id": "^1.0.0"},
    // ...
  ],
  "client": [
    // ...
  ]
}

Which will enable it.

License

Talk is released under the Apache License, v2.0.

Readme

Keywords

none

Package Sidebar

Install

npm i @coralproject/talk-plugin-custom-asset-id

Weekly Downloads

0

Version

1.1.0

License

Apache-2.0

Unpacked Size

42.4 kB

Total Files

8

Last publish

Collaborators

  • kabeaty
  • wyattjoh
  • wikiwi
  • immber
  • tessat
  • nick.funk