# Babble 聊天

**URL:** https://meta.discourse.org/t/babble-chat/87297
**Category:** Plugin
**Tags:** broken
**Created:** [2018年五月11日 22:08 UTC](https://meta.discourse.org/t/babble-chat/87297 "2018-05-11T22:08:04Z")
**Posts on this page:** 20
**Page:** 10

<div class="post-metadata">

### Author: ![OvermindDL1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overminddl1/32/115252_2.png) [@OvermindDL1](https://meta.discourse.org/u/OvermindDL1)
#### Post date: [2018年十月24日 20:15 UTC](https://meta.discourse.org/t/babble-chat/87297/188 "2018-10-24T20:15:52Z")

</div>

> [@gdpelican](#):
>
> Check out the accepted answer (and comments) on a relevant SO question here:

I question that answer… First of all wanting to detect the back button is definitely the wrong style, what should probably happen (I’m not using Babble yet but it will be installed on the next refresh of one of my forums so I’m preparing) is when the chat is opened then the url is changed to something like `/chat` or whatever, or a hash is added like `#chat` or so (saving prior value) and that is pushed onto the `navigation.history` stack. The plugin should always be listening to changes on the `navigation.history` stack and it should open the interface when the appropriate url/hash is set (which also allows someone to bookmark the location to one, especially if you change the hash by replacements instead of pushes as someone navigates a chat). When someone hits back then the `navigation.history` top no longer has the appropriate hash and thus the chat window should be removed, or if they click a close button or so then all you have to do is `pop()` the `navigation.history` stack to remove the chat hash (of which removing would then be seen by the listener and would then close it). This ensures that the chat is only opened or closed in regards to the url/hash changing, and the chat could even add ‘more’ onto the hash (`#/chat/somegroup/somemsgid` or so) to jump immediately to a specified group chat or message or so, thus encoding the entire view state into the hash, which is great for bookmarking, sharing links to some message in the history, etc… and if that ‘replaces’ the top of the `navigation.history` stack then a single back or history-pop will entirely remove the chat regardless (or feel free to ‘push’/‘pop’ certain setups like different message groups or so).

Even better if this is handled via a URL instead that is also handled by the server for fast and direct loading as well (it would still allow you to overlay the chat on any other path via javascript of course).

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2018年十一月3日 10:58 UTC](https://meta.discourse.org/t/babble-chat/87297/190 "2018-11-03T10:58:40Z")

</div>

Thanks for the report @Shayham_Kabir , I’ve patched this in latest.

For future reference, please PM me any XSS-related bugs directly, as I’d rather not have them out in public where people can more easily use them.

---

<div class="post-metadata">

### Author: ![Shayham\_Kabir](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shayham_kabir/32/127767_2.png) [@Shayham\_Kabir](https://meta.discourse.org/u/Shayham_Kabir)
#### Post date: [2018年十一月3日 11:07 UTC](https://meta.discourse.org/t/babble-chat/87297/192 "2018-11-03T11:07:59Z")

</div>

I’m sorry for that and sure next time I’ll PM you.  
Thanks for giving us this awesome plugin 🤗

---

<div class="post-metadata">

### Author: ![legrit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/legrit/32/90307_2.png) [@legrit](https://meta.discourse.org/u/legrit)
#### Post date: [2018年十一月6日 03:19 UTC](https://meta.discourse.org/t/babble-chat/87297/193 "2018-11-06T03:19:18Z")

</div>

can a channel be exported to a normal topic ?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2018年十一月6日 11:20 UTC](https://meta.discourse.org/t/babble-chat/87297/194 "2018-11-06T11:20:41Z")

</div>

> [@legrit](#):
>
> can a channel be exported to a normal topic ?

You could _try_ something like the following in the console:

```plaintext
Topic.find_by(title: <chat_topic_title>).update(archetype: Archetype.regular)

```

But it’s not a supported thing and because the rules are different between making chat posts and topic posts (topic posts must be at least 15 characters, for example) it’s quite possible you’ll run into issues around things like editing or flagging or perhaps even liking posts that have been ported over from a chat topic.

---

<div class="post-metadata">

### Author: ![gnyma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gnyma/32/109864_2.png) [@gnyma](https://meta.discourse.org/u/gnyma)
#### Post date: [2018年十一月17日 14:40 UTC](https://meta.discourse.org/t/babble-chat/87297/195 "2018-11-17T14:40:10Z")

</div>

@gdpelican, I’m not sure what this means:

> [@gdpelican](#):
>
> The chat is stored as a topic in the database, so it’s as persistent as other content on the forum.

Does this mean that there’s a chat history somewhere in Discourse’s topics/categories in case I need to do a search of the chat contents?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2018年十一月19日 03:42 UTC](https://meta.discourse.org/t/babble-chat/87297/196 "2018-11-19T03:42:58Z")

</div>

Hi @gnyma,

The chat contents are in the database, but they don’t appear in search results currently (the whole nature of chat is relatively high-volume, low-quality postings, so I’ve put in code to prevent them from being indexed or appearing in searches)

I’d be happy if someone wrote some code to add a ‘include chats’ checkbox to the advanced search page, but it’s not a thing I’ll work on in the immediate future.

---

<div class="post-metadata">

### Author: ![gnyma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gnyma/32/109864_2.png) [@gnyma](https://meta.discourse.org/u/gnyma)
#### Post date: [2018年十一月19日 07:01 UTC](https://meta.discourse.org/t/babble-chat/87297/197 "2018-11-19T07:01:49Z")

</div>

Thanks for the explanation @gdpelican! The plugin is working great, by the way – I appreciate the work you put into it. 🙂

---

<div class="post-metadata">

### Author: ![JanJoost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janjoost/32/97173_2.png) [@JanJoost](https://meta.discourse.org/u/JanJoost)
#### Post date: [2018年十一月22日 11:22 UTC](https://meta.discourse.org/t/babble-chat/87297/198 "2018-11-22T11:22:08Z")

</div>

Hi all,

I’ve got a bit of an issue here which I’m not sure counts as a bug. So I’d like to ask you for some advice! 🙂

In short: We use Babble for chats, and every now and then we delete the current channel and start a new one - don’t want people to use this as an alternative to a topic.

However, internally chats are treated as topics, but posts there are not searchable and so on. Some functionality was enhanced not too long ago and I think that my problem may be related to this.

In short: I have around 2.500 posts linked to a topic that used to exist and was used as a chat-topic. The topic doesn’t exist anymore, but the posts are still referring that topic.

The problem now is that I can’t delete those messages, or put differently: users can’t delete their own account any more since those posts can’t be deleted:

```
Failed to process hijacked response correctly : Couldn't find Topic with 'id'=2348

```

Is there a way for me to remove these messages from the database in a way that doesn’t mess up other stuff?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![JanJoost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janjoost/32/97173_2.png) [@JanJoost](https://meta.discourse.org/u/JanJoost)
#### Post date: [2018年十一月22日 16:25 UTC](https://meta.discourse.org/t/babble-chat/87297/199 "2018-11-22T16:25:34Z")

</div>

Hi all,

Seems this wasn’t related to Babble but a regression bug fixed here:

> [@Failed to process hijacked response correctly : Couldn't find Topic with 'id'=569](https://meta.discourse.org/t/failed-to-process-hijacked-response-correctly-couldnt-find-topic-with-id-569/102493):
>
> Hi, we are automatically suspending profiles that were not used for at least one year with the plugin discourse-auto-suspend. Later on we are then deleting the profiles with all their posts and topics. (we do have delete user max post age = 3700 and delete all posts max = 999) So far I have deleted already in the last couple of months more then 1500 users with several thousand posts and probably more then one thousand topics. But now I do have a users where the system did start to delete th…

---

<div class="post-metadata">

### Author: ![Iceman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iceman/32/181309_2.png) [@Iceman](https://meta.discourse.org/u/Iceman)
#### Post date: [2018年十一月27日 19:59 UTC](https://meta.discourse.org/t/babble-chat/87297/200 "2018-11-27T19:59:42Z")

</div>

Hi guys, just read the features and doc about the plugin, seems really awesome, however, one quick question:

If I have the “Approve TL0 Users Content” flag enabled for the main forum, will it also be applicable to the Babble chat? Or is it “outside” of that rule?

Thanks!

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2018年十一月27日 20:31 UTC](https://meta.discourse.org/t/babble-chat/87297/201 "2018-11-27T20:31:14Z")

</div>

Hey @Iceman,

Babble doesn’t look at that setting, so TL0 users will be able to post in any chats they can see (we don’t have ‘view / edit’ level permissions on chats… yet?) You can of course prevent TL0 users from posting things in chats by making all of your chats accessible to TL1 or above.

---

<div class="post-metadata">

### Author: ![Jose\_C\_Gomez](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jose_c_gomez/32/137297_2.png) [@Jose\_C\_Gomez](https://meta.discourse.org/u/Jose_C_Gomez)
#### Post date: [2018年十二月4日 18:35 UTC](https://meta.discourse.org/t/babble-chat/87297/202 "2018-12-04T18:35:47Z")

</div>

I’ve read through the thread as much as I could they are LONG! I am wondering if someone can summarize the security aspects of the plugin. I can’t seem to find a specific post on it.  
Can I limit this to certain trust level users? can I limit it to certain categories only?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2018年十二月4日 20:42 UTC](https://meta.discourse.org/t/babble-chat/87297/203 "2018-12-04T20:42:54Z")

</div>

Short answer: yes on all counts!

There are two types of chats, ones which are secured by categories, and one which is secured by one or more groups. You can create a chat available to everyone by assigning ‘trust\_level\_0’ as its group, or one available to TL2 and above by assigning ‘trust\_level\_2’ as its group.

---

<div class="post-metadata">

### Author: ![Fajfi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fajfi/32/381507_2.png) [@Fajfi](https://meta.discourse.org/u/Fajfi)
#### Post date: [2018年十二月6日 16:10 UTC](https://meta.discourse.org/t/babble-chat/87297/204 "2018-12-06T16:10:42Z")

</div>

Where’s auto-open function, will it be available?

---

<div class="post-metadata">

### Author: ![Hifihedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hifihedgehog/32/140207_2.png) [@Hifihedgehog](https://meta.discourse.org/u/Hifihedgehog)
#### Post date: [2018年十二月10日 06:35 UTC](https://meta.discourse.org/t/babble-chat/87297/205 "2018-12-10T06:35:47Z")

</div>

This is a stupendous plug-in. One minor quibble. Can admins delete the first post in a chatroom? I can delete or edit all subsequent posts except the first. For setting out chatroom channel rules or discussion guidelines for each channel, it is often helpful to edit them as circumstances change and hindsight comes into play. Having to go through and delete a chatroom, lose its entire history, and then recreate a chatroom just to make a new first post seems like a silly exercise. Otherwise, this is wonderful. This saves me the trouble of a separate chatroom (including processing overhead and moderation staff) from my forum.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [2019年一月5日 02:36 UTC](https://meta.discourse.org/t/babble-chat/87297/206 "2019-01-05T02:36:21Z")

</div>

Hey Guys

my Chat topic has reached 10000 posts and was closed by the system account.  
Is creating a new chat room to replace the current one the only way?

Or is there a better seamless way?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2019年一月6日 17:36 UTC](https://meta.discourse.org/t/babble-chat/87297/207 "2019-01-06T17:36:23Z")

</div>

Can you describe what ‘closed’ means here? Is it not letting you post further? What’s the behaviour you see after it hits the 10k limit?

---

<div class="post-metadata">

### Author: ![Jose\_C\_Gomez](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jose_c_gomez/32/137297_2.png) [@Jose\_C\_Gomez](https://meta.discourse.org/u/Jose_C_Gomez)
#### Post date: [2019年一月11日 12:56 UTC](https://meta.discourse.org/t/babble-chat/87297/208 "2019-01-11T12:56:42Z")

</div>

Just installed the Plugin, getting the following Error when trying to create a Chat Channel

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/f/2fc5dcf2cc1258631a47f189ad108819ea6f1c7f.png)

I have tried doing it for groups and or categories, same result. Any ideas?

Discourse Version: [v2.2.0.beta7 +126]  
Bable: 4.0.9

---

<div class="post-metadata">

### Author: ![Juan\_Adamuz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/juan_adamuz/32/86808_2.png) [@Juan\_Adamuz](https://meta.discourse.org/u/Juan_Adamuz)
#### Post date: [2019年一月11日 18:08 UTC](https://meta.discourse.org/t/babble-chat/87297/209 "2019-01-11T18:08:35Z")

</div>

Same here, my chat channel dissapeared and now I cant create a channel ☹

[上一頁](https://meta.discourse.org/t/babble-chat/87297.md?page=9)

[下一頁](https://meta.discourse.org/t/babble-chat/87297.md?page=11)
