Chat-O-Matic/application/views/ConversationAccountItem.cpp
Jaidyn Ann 057e7fba9b Add "system buffer" per protocol
Now, per each account, there is a read-only chat view associated with
it, accessible through its item in the conversations list. This can be
used to place system messages, MOTDs, insignificant errors, etc.

Protocols can send text to this buffer by specifying no "chat_id" in
an IM_MESSAGE_RECEIVED message.
2021-08-12 15:43:52 -05:00

33 lines
541 B
C++

/*
* Copyright 2021, Jaidyn Levesque <jadedctrl@teknik.io>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "ConversationAccountItem.h"
#include "ProtocolLooper.h"
ConversationAccountItem::ConversationAccountItem(const char* name,
int64 instance, ProtocolLooper* looper)
:
BStringItem(name),
fInstance(instance),
fProtocolLooper(looper)
{
}
int64
ConversationAccountItem::GetInstance()
{
return fInstance;
}
ProtocolLooper*
ConversationAccountItem::GetLooper()
{
return fProtocolLooper;
}