# Extend api.ChannelMessage

**URL:** <https://forum.heroiclabs.com/t/extend-api-channelmessage/5277>\
**Category:** Runtime Framework\
**Created:** [May 23, 2024, 2:39pm UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277 "2024-05-23T14:39:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bahman.Binary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/bahman.binary/32/2174_2.png) [@Bahman.Binary](https://forum.heroiclabs.com/u/Bahman.Binary)\
**Post date:** [May 23, 2024, 2:39pm UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/1 "2024-05-23T14:39:11Z")

</div>

Hello

I want to extend the `ChannelMessage` struct.  
How can I do this?

I searched a lot but didn’t find any solution for this. This bothered me a lot.

Thank you for helping me.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [May 23, 2024, 2:41pm UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/2 "2024-05-23T14:41:05Z")

</div>

Hello @Bahman.Binary,

Can you please elaborate on what you’re trying to achieve by extending the struct?

---

<div class="post-metadata">

**Author:** ![Bahman.Binary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/bahman.binary/32/2174_2.png) [@Bahman.Binary](https://forum.heroiclabs.com/u/Bahman.Binary)\
**Post date:** [May 23, 2024, 2:49pm UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/3 "2024-05-23T14:49:17Z")

</div>

@sesposito  
well, I want to add some props to the channel message for my own customization but I don’t know how to do this. I found out that there is some limitation in Golang struct extending and I don’t know how to get around this limitation.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [May 24, 2024, 10:27am UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/4 "2024-05-24T10:27:10Z")

</div>

The message format is defined in the server protobuf definitions.

Can you elaborate on what you’re trying to add? The message content is a json payload, you can add custom data there if needed.

Best.

---

<div class="post-metadata">

**Author:** ![Bahman.Binary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/bahman.binary/32/2174_2.png) [@Bahman.Binary](https://forum.heroiclabs.com/u/Bahman.Binary)\
**Post date:** [May 25, 2024, 7:04am UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/5 "2024-05-25T07:04:56Z")

</div>

I specially want to add a property named `KickerId` that actualy is `caller` variable’s UUID in function of `KickGroupUsers` of `core_group.go` file.

---

<div class="post-metadata">

**Author:** ![Bahman.Binary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/bahman.binary/32/2174_2.png) [@Bahman.Binary](https://forum.heroiclabs.com/u/Bahman.Binary)\
**Post date:** [May 25, 2024, 7:07am UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/6 "2024-05-25T07:07:59Z")

</div>

@sesposito Actually I want to detect who kicks another user in group.  
If you have a better idea to do this, I welcome it.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [May 31, 2024, 10:27am UTC](https://forum.heroiclabs.com/t/extend-api-channelmessage/5277/7 "2024-05-31T10:27:12Z")

</div>

Extending the message doesn’t seem to be the best approach here, we’ve created an internal ticket to add support for the `kickerId` to be added to the content of the message in a future release.

Best.
