diff --git a/src/chat/functions/prepareMessageButtons.ts b/src/chat/functions/prepareMessageButtons.ts index cf87c2f97e..d9019ce6a5 100644 --- a/src/chat/functions/prepareMessageButtons.ts +++ b/src/chat/functions/prepareMessageButtons.ts @@ -332,10 +332,14 @@ webpack.onFullReady(() => { }); wrapModuleFunction(createFanoutMsgStanza, async (func, ...args) => { - const [, , proto] = args; - let buttonNode: websocket.WapNode | null = null; + /** + * In version 2.2411.x the order of the proto arguments was changed, + * before it was the third argument, now it is the second + */ + const proto = args[1].id ? args[2] : args[1]; + if (proto.buttonsMessage) { buttonNode = websocket.smax('buttons'); } else if (proto.listMessage) {