Giter Club home page Giter Club logo

Comments (3)

ObjectIsAdvantag avatar ObjectIsAdvantag commented on June 27, 2024

Good point Jan, we'll definitely need to create a workaround in the node-sparkbot library.

I raised this discrepancy among Spark clients to the Spark for Developer team, it's currently being escalated to the Spark clients team. If you're interested to get updates, you can ask [email protected] to be added to issue 62735:

Background context: the text property cannot safely be used to trim bot mentions, as NickNames (Mentionned participants of the room) vary depending on the list of participants, and the raw text does not provide metadata about where the mentions is exactly. Therefore, the only way to trim the mention is to parse the HTML code. 

Request: we need some alignment and an article on Spark4Devs to explain how to safely trim the bot mention for Cisco Spark.

Here are the examples of how HTML code is generated:

Mac Desktop client: base64 ENCODED person id, AND <p> tag

"text": "hi Steve from the Mac Desktop client",
"html": "<p>hi <spark-mention data-object-type=\"person\" data-object-id=\"Y2lzY29zcGFyazovL3VzL1BFT1BMRS8wM2ZiZTEwOS0yM2Y2LTQ1OWItODFlNS02YzYxM2JhMWNhZTE\">Steve</spark-mention> from the Mac Desktop client</p>",

iPhone native client: base64 DECODED person id, NO <p> tag

"text": "Hi Steve S from my iPhone",
"html": "Hi <spark-mention data-object-id=\"92b3dd9a-675d-4a41-8c41-2abdf89f44f4\" data-object-type=\"person\">Steve S</spark-mention> from my iPhone",

Web client (Chrome Windows): base64 ENCODED person id, NO <p> tag

"text": "hi Valérie from Web client Chome on Windows",
"html": "hi <spark-mention data-object-type=\"person\" data-object-id=\"Y2lzY29zcGFyazovL3VzL1BFT1BMRS84ZjlhYmQ4ZS0yZTJiLTQ5MTYtOGJlZC0wMDMyZjRiYTU3YTM\">Valérie</spark-mention> from Web client Chome on Windows",

Windows desktop client: base64 ENCODED person id, AND <p> tag

"text": "hi Valérie from Windows Desktop",
"html": "<p>hi <spark-mention data-object-type=\"person\" data-object-id=\"Y2lzY29zcGFyazovL3VzL1BFT1BMRS84ZjlhYmQ4ZS0yZTJiLTQ5MTYtOGJlZC0wMDMyZjRiYTU3YTM\">Valérie</spark-mention> from Windows Desktop</p>",

from node-sparkbot.

ObjectIsAdvantag avatar ObjectIsAdvantag commented on June 27, 2024

Then, in the interpreter both data-object-id and data-object-type need to be searched for in spark-mention

from node-sparkbot.

ObjectIsAdvantag avatar ObjectIsAdvantag commented on June 27, 2024

published on npm as part of v0.10.1

from node-sparkbot.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.