Author Topic: How to place messages in the chat?  (Read 2431 times)

0 Members and 1 Guest are viewing this topic.

Offline wismerhil

  • Newbie
  • *
  • Posts: 4
How to place messages in the chat?
« on: 20 01 2015, 07:57:33 »
Please tell me how to add incoming/outgoing messages in chat? In principle, with the incoming I figured out a method db_event_add. In General please tell me how to put incoming/outgoing chat messages.

Offline Robyer

Re: How to place messages in the chat?
« Reply #1 on: 21 01 2015, 05:06:34 »
In case you're talking about classic conversations (with 1 user):

In Facebook protocol I use combination of ProtoChainRecvMsg() protocol method for new unread incomming messages, and db_event_add() for messages sent from other instances.

Sent messages from Miranda are added automatically by StdMsg/Scriver/TabSRMM plugin... You get info about user sending message in SendMsg() protocol method.

In case you're talking about group chats (aka IRC/Jabber chatrooms or other multiuser conversations):

These events are not saved into database. For using chats you should see m_chat.h API where you can also understand how to add new events (= messages, etc.) into log.
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.