How to stop the posting process in a client side script

Unsolved Technical Support

Suggested Topics


  • 0 Votes
    19 Posts
    178 Views

    Thanks, that works perfectly. I'm handling the hook in my custom theme, but this probably needs to be in the https://community.nodebb.org/post/95161 plugin as well (without the importedVotes)

    library.setTopicVotes = async function(hookData) { const topicData = await topics.getTopicFields(hookData.post.tid, ['cid', 'importedVotes']); const importedVotes = topicData.importedVotes || 0 const voteData = await db.getSortedSetRangeByScoreWithScores(`tid:${hookData.post.tid}:posts:votes`, 0, -1, 1, '+inf'); let allvotes = voteData.reduce((acc, cur) => acc + cur.score, 0); allvotes = allvotes + importedVotes await db.sortedSetAdd(`cid:${topicData.cid}:tids:votes`, allvotes, hookData.post.tid) }
  • How to stop Welcome email in nodebb?

    Unsolved Technical Support
    0 Votes
    4 Posts
    292 Views

    As @baris has replied in that issue, this is already a feature in the ACP. 👍

    It sounds like you are looking to disable the "welcome" email, but preserve the existing email confirmation emails, yes?

    In that case, you'll have to wait until v2.2.0, at which point you can use a plugin to change the template for the welcome email back to verify-email.

  • How to post in chat room using API

    Unsolved Technical Support
    0 Votes
    1 Posts
    188 Views

    Hi there,

    I'm working on a script that interact with NodeBB using API. I need to create a new chat room between 2 users and post content in it. In the API documentation, there's some data concerning "Accessing a chat room" and "Getting a chat room", but in write api there's nothing at all.

    Is it currently impossible to post content in the chat room from the api?

    I'm using NodeBB v1.17.0.
    Api key created in admin panel. No problem to read chat room but writing failed.

    { "status": { "code": "not-found", "message": "Invalid API call" }, "response": {} }
  • 0 Votes
    5 Posts
    564 Views

    @phenomlab unfortunately true, as the amount of work involved in getting the exporter working is not trivial at all.

    Whether we built it from scratch or updated the existing exporter (which was built against a very old version of Flarum), the cost would still be the same.

  • 0 Votes
    3 Posts
    2k Views

    Wasn't lwip used in 0.7.x/0.8.x?