# Error - e.sendChatMessage is not a function

**URL:** https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943
**Category:** Support
**Tags:** chat, gifs
**Created:** [June 10, 2023, 6:50pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943 "2023-06-10T18:50:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Crius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crius/32/317214_2.png) [@Crius](https://meta.discourse.org/u/Crius)
#### Post date: [June 10, 2023, 6:50pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/1 "2023-06-10T18:50:07Z")

</div>

Fresh out of the skillet:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/6/6/166d300c1b8d4814b2a898b5baac9909d9e46c64.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/b/8/4b8a3746059e8082d574a30e94c353d7dc610fad.png)

Tried with both giphy and tenor, not that it would matter when the problem is not **loading** the content but putting it into the chat, but eh.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 10, 2023, 7:10pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/2 "2023-06-10T19:10:07Z")

</div>

I’ve just sent one as a test here on Meta and it seems to be working fine. Have you also updated your Discourse to Latest along with the component?

---

<div class="post-metadata">

### Author: ![Crius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crius/32/317214_2.png) [@Crius](https://meta.discourse.org/u/Crius)
#### Post date: [June 10, 2023, 11:18pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/3 "2023-06-10T23:18:12Z")

</div>

It’s updated since I first raised the issue

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/c/0/1c0c1e6f1fa869988c9702fb48e7109b3fb1f7a5.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 10, 2023, 11:39pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/4 "2023-06-10T23:39:03Z")

</div>

My test site is on the latest version as of today [1abfe2e61d](https://github.com/discourse/discourse/commits/1abfe2e61d12b1b559aab0132ec3fb7cc8b87232), which seems to be different than yours, so it looks like you could maybe try an update from your `/upgrade` page and see if that helps

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/f/d/9fddddbf384e335bf530b827d9306c9b0e43e1b2.png)

I think there was an issue with gifs in chat a couple of weeks back, and the theme component update also relies on a later version of Discourse to work fully.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 11, 2023, 5:34am UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/5 "2023-06-11T05:34:52Z")

</div>

Yes, that commit/your Discourse version is over a month old [DEV: Enable color CI output and tweak formatting (#21527) · discourse/discourse@eec10ef · GitHub](https://github.com/discourse/discourse/commit/eec10efc3dfad0d274cadb60e9e45f2a345b2a5d)

There have since been changes to the Chat API: [FIX: uses chat api new sendChatMessage (#38) · discourse/discourse-gifs@eb3ec48 · GitHub](https://github.com/discourse/discourse-gifs/commit/eb3ec48c3446cf23973613516ffe12d6fe6ee519)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/8/0/c/80c325b7c7ba69fed73965123cf63bf9d0a4a9fa.png)

So I wouldn’t expect this to work either.

---

<div class="post-metadata">

### Author: ![Crius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crius/32/317214_2.png) [@Crius](https://meta.discourse.org/u/Crius)
#### Post date: [June 11, 2023, 3:47pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/6 "2023-06-11T15:47:48Z")

</div>

Weird that discourse didn’t warn me I was running an old version.

Anyway I’ve updated and now it seems to be properly adding the gifs in the chat as well. Thank you for helping finding out what was going wrong 🙂

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 11, 2023, 4:08pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/7 "2023-06-11T16:08:22Z")

</div>

New commits are added almost every day. 🙂 Not everyone wants to update that often, so will generally only do one when they want a particular new feature or a fix they’ve been waiting on. The version checks with the green/red faces are done when there’s been a version bump rather than on every new commit. 👍

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 11, 2023, 4:09pm UTC](https://meta.discourse.org/t/error-e-sendchatmessage-is-not-a-function/267943/8 "2023-07-11T16:09:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
