MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    使用mirai-http时遇到的关于messageId的问题

    HTTP API和第三方SDK
    1
    1
    64
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Jadlokin-Scarlet last edited by

      我现在的场景是将mirai和mirai-http作为一个独立的模块部署在docker中,其他模块通过通过http与mirai通信。
      我会把通过websocket收到的每一条消息存入记录表,以供回复消息的场景使用。
      如果我重新打包部署mirai,那么mirai的缓存消息将会清空,这导致新生成的messageId可能会和已经清理掉的缓存消息的messageId重复。(推测的重复原因)
      希望生成新的messageId的时候,加入时间戳参数,使mirai即使重新打包部署也能不出现重复的messageId。:P

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact