Git Product home page Git Product logo

Comments (14)

ineo6 avatar ineo6 commented on July 19, 2024

你的场景是企业内部机器人吧?企业机器人还没有过多使用,我需要看下。

你说的权限控制都依赖于配置,你的设想是如何配置权限呢?

目前看机器人无法知道所有群信息,单聊信息,这样的话是无法配置的。

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

你的场景是企业内部机器人吧?企业机器人还没有过多使用,我需要看下。

你说的权限控制都依赖于配置,你的设想是如何配置权限呢?

目前看机器人无法知道所有群信息,单聊信息,这样的话是无法配置的。

是的,企业内部机器人,现在只有企业内部机器人可以用,自定义机器人Outgoing功能好像不让申请了,官方群里都在推自定义机器人。

第一个场景判断群聊和单聊的话只需要通过 HTTP BODY 传来的 conversationType 这个参数判断,(1-单聊、2-群聊),我设想的是咱们 dingtalk 适配器在配置文件中可以指定做一个群聊和单聊使用的开关,比如仅可以使用群聊,那就把 conversationType = 1 的全部忽略,只处理 conversationType = 2 的;仅可以使用单聊的话,那就把 conversationType = 2 的全部忽略,只处理 conversationType = 1 的;单聊和群聊都允许的话那就 conversationType 参数是 1 和 2 的都处理,不忽略。

第二个场景只允许某些群使用,只需要通过 HTTP BODY 传来的 conversationId 这个参数判断,每一个群的 conversationId 是唯一的,通过指定 conversationId 的白名单或者黑名单可以放行或者阻止群里机器人的使用。(再复杂点的话可以做针对员工的白黑名单,通过senderStaffId这个参数控制)

您看一下这么说可以理解吗?
非常感谢

from hubot-dingtalk.

ineo6 avatar ineo6 commented on July 19, 2024

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

非常感谢。期待大神早点弄好,我能早点用上,我现在权限控制这一块搞不定,等待大神出马。

from hubot-dingtalk.

ineo6 avatar ineo6 commented on July 19, 2024

1.4.0版本已发布,里面加入了会话控制。

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

1.4.0版本已发布,里面加入了会话控制。

给力,非常感谢

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

从实际使用上来看貌似会话白名单使用场景更多,因为企业机器人创建好后任何一个群都可以添加进去,员工自己随便建个群,也能添加机器人使用,所以白名单还是控制更方便,您后期方便的话可以考虑也加一下白名单,非常感谢。我先自己尝试改改代码。
再次表示感谢,如果有打赏通道的话,希望可以请您喝杯咖啡。

from hubot-dingtalk.

ineo6 avatar ineo6 commented on July 19, 2024

有道理,这个改起来比较快。其实另外想问下conversationId你是怎么获取的,我在想有什么好的方式,可以交互式的设置名单。

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

有道理,这个改起来比较快。其实另外想问下conversationId你是怎么获取的,我在想有什么好的方式,可以交互式的设置名单。

没有好办法,哈哈哈,就是你这种思路,主要是不知道钉钉那边具体怎么加密的,我的想法和你是一样的

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

设置个debug模式,开debug模式的时候把 conversationId 输出在控制台,便于权限设置时使用,关了debug模式的话就不输出,这样对机器人响应时间上来说是不是有帮助呢

from hubot-dingtalk.

ineo6 avatar ineo6 commented on July 19, 2024

hubot本身启动的时候应该有debug模式了,现在adapter里面也打印的有debuginfo级别的信息,目前conversationId是在info级别,默认应该会显示在控制台。

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

hubot本身启动的时候应该有debug模式了,现在adapter里面也打印的有debuginfo级别的信息,目前conversationId是在info级别,默认应该会显示在控制台。

好吧,那我暂时没有办法啦

from hubot-dingtalk.

ineo6 avatar ineo6 commented on July 19, 2024

1.4.1已发布

from hubot-dingtalk.

ainuoyan avatar ainuoyan commented on July 19, 2024

1.4.1已发布

给力,已测试,正常使用,非常感谢。

from hubot-dingtalk.

Related Issues (8)

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.