【问题标题】:Is it possible to update room title (and other options) using ejabberd REST API?是否可以使用 ejabberd REST API 更新房间标题(和其他选项)?
【发布时间】:2021-04-25 15:48:57
【问题描述】:

我正在查看 Ejabberd 的管理 API - https://docs.ejabberd.im/developer/ejabberd-api/admin-api/,有 API 可以

  • 创建房间
  • create_room_with_opts
  • destroy_room
  • set_room_affiliations
  • get_room_*(获取房间 API 很少)

但没有更新房间选项的选项。有没有办法更新现有房间的房间名称和其他选项?

【问题讨论】:

    标签: ejabberd


    【解决方案1】:

    就在那儿:)

    https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#change-room-option

    示例用法:

    $ ejabberdctl get_room_options room1 conference.localhost
    title
    public  true
    moderated       true
    ...
    
    $ ejabberdctl change_room_option room1 conference.localhost title ABCD
    $ ejabberdctl change_room_option room1 conference.localhost moderated false
    $ ejabberdctl change_room_option room1 conference.localhost public false
    
    $ ejabberdctl get_room_options room1 conference.localhost
    title   ABCD
    public  false
    moderated       false
    ...
    

    【讨论】:

    • 哇,我一定是瞎了。我什至请一位同事查看清单,以防我遗漏了什么,他也没有找到任何东西。我们现在都应该去测试一下我们的眼睛。 :) 谢谢!
    猜你喜欢
    • 2020-11-14
    • 2019-10-19
    • 1970-01-01
    • 2014-04-13
    • 2018-10-07
    • 2021-08-10
    • 1970-01-01
    • 2020-01-26
    • 1970-01-01
    相关资源
    最近更新 更多