# 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:** 3

<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年六月28日 03:02 UTC](https://meta.discourse.org/t/babble-chat/87297/45 "2018-06-28T03:02:23Z")

</div>

I want the full wishlist. 😉

---

<div class="post-metadata">

### Author: ![nexo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nexo/32/106384_2.png) [@nexo](https://meta.discourse.org/u/nexo)
#### Post date: [2018年六月30日 08:48 UTC](https://meta.discourse.org/t/babble-chat/87297/46 "2018-06-30T08:48:28Z")

</div>

How can I make the line between messages from that black to a very light gray? Or better yet how can i add a very light gray line between every message sent?

---

<div class="post-metadata">

### Author: ![nexo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nexo/32/106384_2.png) [@nexo](https://meta.discourse.org/u/nexo)
#### Post date: [2018年六月30日 10:07 UTC](https://meta.discourse.org/t/babble-chat/87297/48 "2018-06-30T10:07:53Z")

</div>

@gdpelican why does this happen everytime me or someone enters a message? It’s extremely painful!

 ![Capture72](https://global.discourse-cdn.com/meta/original/3X/3/8/3839a126bc798a950396f406ef8880d899897f9e.PNG)

---

<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年七月1日 11:59 UTC](https://meta.discourse.org/t/babble-chat/87297/49 "2018-07-01T11:59:49Z")

</div>

Hm, I’ve noticed that myself for the first few messages of a chat, but haven’t been able to repro just yet. It should go away either on refresh or after the first couple messages of a chat have been entered… and I’ll have some time tomorrow to put a proper fix in. Thanks for the report.

For css customization, you want to have a look at `<yoursite>/admin/customize/themes`, and add custom styles to the elements in the chat. For example, this might get you started on a grey line between each message:

```plaintext
.babble-post-container {
  border-bottom: 1px solid lightgrey;
  padding-bottom: 8px;
}

```

---

<div class="post-metadata">

### Author: ![nexo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nexo/32/106384_2.png) [@nexo](https://meta.discourse.org/u/nexo)
#### Post date: [2018年七月1日 23:06 UTC](https://meta.discourse.org/t/babble-chat/87297/51 "2018-07-01T23:06:30Z")

</div>

@gdpelican Yeah that worked, also i tried customizing the rest of the css and made some nice changes. However i cant seem to shrink or remove this extra space between the composer and messages.

 ![Capture75](https://global.discourse-cdn.com/meta/original/3X/b/b/bb56ada9682944eb7aa3eee530e6d03a790e0105.PNG)

Also another bug, on the top there’s a little crack where the outer website seeps through the fullscreen chat.

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/9/99c571e30bf41a88e56bfce2af59801c35748b2f.png)

_I appreciate the **load messages** bug you’re fixing tomorrow_

---

<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年七月2日 03:21 UTC](https://meta.discourse.org/t/babble-chat/87297/52 "2018-07-02T03:21:20Z")

</div>

Alright, there should be a fix for messages not being loaded bug at the beginning of a chat lifetime.

---

<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年七月5日 11:15 UTC](https://meta.discourse.org/t/babble-chat/87297/53 "2018-07-05T11:15:21Z")

</div>

Hey team, I’ve just released the PM branch for beta testing. This is a pretty significant update (it’ll be a major version bump once it goes into master), so I’d love some folks to try it out if you’re willing. What’s new:

- **Direct messaging** : You can now have a one-to-one babble chat with anyone you could send a private message to.  

- **More intuitive and customizable chat handle** : The babble widget is now much more customizable through css, and indicates when you have unread content and mentions  

- **Better unread indication** : Always know when you have stuff to read, and where. Channels are marked with whether they are read or not, and indicate if there are direct messages or @mentions  

- **Who’s online integration** : If you have this plugin installed alongside the [Who’s online](https://meta.discourse.org/t/whos-online-plugin-discourse-whos-online/52345) plugin, it will highlight who is online in the direct messages section, as well as avatars within the chat itself.  

It’s currently live on [https://discourse-babble.com](https://discourse-babble.com), or you can install it yourself by referencing the `pms` branch of the Babble repo:

```plaintext
# app.yml
- git clone -b pms git@github.com:gdpelican/babble.git

```

Eager to hear your feedback; let me know how you get on.

---

<div class="post-metadata">

### Author: ![seasiri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seasiri/32/119769_2.png) [@seasiri](https://meta.discourse.org/u/seasiri)
#### Post date: [2018年七月6日 18:21 UTC](https://meta.discourse.org/t/babble-chat/87297/54 "2018-07-06T18:21:30Z")

</div>

@gdpelican  
After install pms, upon loading index page. I can’t find babble icon to open chat window at all. I wonder where can I set that? The plugin is enabled.

Also, this also bug I believe. when i add catagories. That popup avoid me to save.

 ![Capt3333ure](https://global.discourse-cdn.com/meta/original/3X/6/a/6abc85498ebce6d84ca16818046839f9d55a2473.PNG)  
 ![Captu22222re](https://global.discourse-cdn.com/meta/original/3X/9/5/9540fd691aa6029975d1d65843a270f7e4d794e3.PNG)

\*\* I can’t do any now. I can’t add channle both category and group. I dont know how to reset database of Babble. I tried rebuild but the problem still occur. Please help. \*\*

---

<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日 19:49 UTC](https://meta.discourse.org/t/babble-chat/87297/55 "2018-07-06T19:49:54Z")

</div>

Babble won’t appear unless you have a chat channel for a group or channel created. I’ll put in a fix to allow it to appear if the PM feature is turned on (It’s marked ‘Enable one-to-one chat with Babble’ in the plugin settings, and defaults to off)

Did you have Babble installed on this instance previously, or is it a fresh install? Would you mind posting or PMing me the result of running the following commands from your droplet?

```plaintext
# enter your rails console
/var/discourse/launcher enter app
rails c

```

```plaintext
# then, the results of the following two commands:
pp Topic.babble; nil
pp Category.all; nil

```

---

<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日 19:59 UTC](https://meta.discourse.org/t/babble-chat/87297/56 "2018-07-06T19:59:46Z")

</div>

Ah, actually, I see the cause of this now. Thanks for the report, I’ll have it patched up shortly.

EDIT: I believe the cause of this is now fixed; let me know if you encounter further trouble?

---

<div class="post-metadata">

### Author: ![Jeff\_Vienneau](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeff_vienneau/32/108772_2.png) [@Jeff\_Vienneau](https://meta.discourse.org/u/Jeff_Vienneau)
#### Post date: [2018年七月6日 23:10 UTC](https://meta.discourse.org/t/babble-chat/87297/57 "2018-07-06T23:10:35Z")

</div>

On some iPhones the addition of the bullhorn icon is causing a wrap that obscures the category / view selection bar.

Is this an issue or am I holding it wrong?

 ![e7ac53631189f3b9268bffee390c17feb750998a_1_281x500](https://global.discourse-cdn.com/meta/original/3X/e/6/e6890be870b580069f914a5a0a4512bad5f19457.png)

---

<div class="post-metadata">

### Author: ![seasiri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seasiri/32/119769_2.png) [@seasiri](https://meta.discourse.org/u/seasiri)
#### Post date: [2018年七月7日 03:11 UTC](https://meta.discourse.org/t/babble-chat/87297/58 "2018-07-07T03:11:11Z")

</div>

What theme are you using? I like the badge color of Ride Event and Staff Discussion. How do you do that?

---

<div class="post-metadata">

### Author: ![seasiri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seasiri/32/119769_2.png) [@seasiri](https://meta.discourse.org/u/seasiri)
#### Post date: [2018年七月7日 03:21 UTC](https://meta.discourse.org/t/babble-chat/87297/59 "2018-07-07T03:21:42Z")

</div>

@gdpelican  
[Bug Report] [Database issue]

 ![C1111apture](https://global.discourse-cdn.com/meta/original/3X/8/6/86309c5a5fe2e8879b1748f67fb3696378d07642.PNG) ![C11111apture](https://global.discourse-cdn.com/meta/original/3X/3/2/320771e8940c854c9d1da8f37a96c40381a2985b.PNG)

> Babble create unknown number group below with a lot of text char as second picture shown.

This alter main discourse group database. Careful I am very scare right now hehe.

---

<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年七月7日 07:49 UTC](https://meta.discourse.org/t/babble-chat/87297/60 "2018-07-07T07:49:31Z")

</div>

Ah, great, thanks for reporting that.

Babble creates groups for direct messages in the backend, as this is the easiest way to allow only certain people (namely the 2 people involved in the direct message) to view the chat.

I’ve fixed the /groups route and the groups appearing under the New Category model in the latest, so you shouldn’t see those strange groups anymore..

---

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [2018年七月7日 08:03 UTC](https://meta.discourse.org/t/babble-chat/87297/61 "2018-07-07T08:03:49Z")

</div>

Just out of curiosity, what happens when you have a few users on and type `<script>alert('h4x0r');</script>` into the chat window?

---

<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年七月7日 08:04 UTC](https://meta.discourse.org/t/babble-chat/87297/62 "2018-07-07T08:04:07Z")

</div>

It looks like Babble supported screen sizes down to 324px, whereas there are still some HTC and iPhone 4/5 dinosaurs out there with a screen width of 320px. These are are the kinds of things that make devs like me sad.

In any case, I’ve fixed the header display for very small screens, so we should be able to support down to the industry standard of 320px now.

---

<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年七月7日 08:08 UTC](https://meta.discourse.org/t/babble-chat/87297/63 "2018-07-07T08:08:03Z")

</div>

We use the same rendering / cleansing code for chat posts as Discourse does in rendering regular posts in a topic, so the answer is ‘nothing bad’. Here’s the chat result for that input on the test site:

![07%20AM](https://global.discourse-cdn.com/meta/original/3X/9/d/9dd9427502fd2bd5416bcdef2315d752ac9cb061.png)

---

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [2018年七月7日 08:11 UTC](https://meta.discourse.org/t/babble-chat/87297/64 "2018-07-07T08:11:28Z")

</div>

Thanks. I haven’t looked at their XSS sanitization filters but a result of `undefined` indicates some JS executed, which is unexpected.

---

<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年七月7日 08:22 UTC](https://meta.discourse.org/t/babble-chat/87297/65 "2018-07-07T08:22:49Z")

</div>

My understanding is that Discourse ‘cooks’ its posts, a process in which they create a one-off JS runtime serverside when the post is created, in which they run some js code (stuff like ‘replace `:heart:` with a heart emoji’, remove unwanted tags like `<script>` and `<img onload='console.log('hi!') />`, etc.)

This js is executed only once, on the server, in the aforementioned one-off js runtime, after which the resulting html is stored in a separate column in the database as sanitized text, which is then served to the clients on subsequent page loads. I haven’t been able to replicate a valid XSS attack using Babble for several years now, although if you’re able to get a console log or alert or whatnot to appear on [discourse-babble.com](http://discourse-babble.com), please PM me the exact text you entered in order to accomplish it and I’ll fix it immediately. 🙂

---

<div class="post-metadata">

### Author: ![balibebas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balibebas/32/100015_2.png) [@balibebas](https://meta.discourse.org/u/balibebas)
#### Post date: [2018年七月7日 08:26 UTC](https://meta.discourse.org/t/babble-chat/87297/66 "2018-07-07T08:26:01Z")

</div>

Thanks for the 411. Super useful. I haven’t actually succeeded on performing a reflection attack but if I did I wouldn’t tell anyone here. 😉 And thanks for the plug-in!

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

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