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

0 Members and 1 Guest are viewing this topic.

Offline wismerhilTopic starter

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
How to place messages in the chat?
« on: 20 01 2015, 07:57:33 »
Hello.
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.
See http://trac.miranda-ng.org/browser/trunk/protocols/FacebookRM/src/process.cpp#L788

Sent messages from Miranda are added automatically by StdMsg/Scriver/TabSRMM plugin... You get info about user sending message in SendMsg() protocol method.
See http://trac.miranda-ng.org/browser/trunk/protocols/FacebookRM/src/messages.cpp#L114


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.
See http://trac.miranda-ng.org/browser/trunk/include/m_chat.h
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.