1

I need a way to create customized stanzas and have mongooseIM recognize them and store the data accordingly inside of a given database such as mysql for later retrieval.

The reason I want to do this is because an app that I am building has a chat that requires complex querying based on sub objects'parameters. Also anything a user does inside of the app but outside of the chat like change the title of the group chat or like a post, it is logged inside of the chat as a log message with the given postId and userId.

So ideally I want it to do something like this:

<postId>1</postId> //So that I can query by post id
<description>Hello</description> //Data for clients to update real time
<userId>1</userId> //also want to be able to query the db by this.

all these variables should be saved into the database that is provided for MAM inside of the MongooseIM

Parth Patel
  • 157
  • 5

1 Answers1

0

You need to rite your custom mod in erlang. Here is how you can start on this :

https://mongooseim.readthedocs.io/en/latest/user-guide/Getting-started/

Build and install from source code

To build and install MongooseIM from source code, do the following:

Clone the Git repository:
 git clone https://github.com/esl/MongooseIM.git Go to your MongooseIM directory. Run the following command: make rel.

In the code You will see apps/ejabberd/src

Write you mode these and compile to get bin file and move the bin files to the release.

Jaspreet Chhabra
  • 1,431
  • 15
  • 23