Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
503585ac
Commit
503585ac
authored
May 28, 2018
by
Ronan
Browse files
fix(MainDb): store basic chat room participants
parent
c7eece9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/chat/chat-room/basic-chat-room-p.h
View file @
503585ac
...
...
@@ -30,6 +30,7 @@ LINPHONE_BEGIN_NAMESPACE
class
BasicChatRoomPrivate
:
public
ChatRoomPrivate
{
private:
std
::
string
subject
;
std
::
shared_ptr
<
Participant
>
me
;
std
::
list
<
std
::
shared_ptr
<
Participant
>>
participants
;
bool
cpimAllowed
=
false
;
bool
multipartAllowed
=
false
;
...
...
src/chat/chat-room/basic-chat-room.cpp
View file @
503585ac
...
...
@@ -40,6 +40,7 @@ BasicChatRoom::BasicChatRoom (
const
ChatRoomId
&
chatRoomId
)
:
ChatRoom
(
p
,
core
,
chatRoomId
)
{
L_D
();
d
->
me
=
make_shared
<
Participant
>
(
getLocalAddress
());
d
->
participants
.
push_back
(
make_shared
<
Participant
>
(
getPeerAddress
()));
}
...
...
@@ -102,8 +103,8 @@ shared_ptr<Participant> BasicChatRoom::findParticipant (const IdentityAddress &)
}
shared_ptr
<
Participant
>
BasicChatRoom
::
getMe
()
const
{
lError
()
<<
"getMe() is not allowed on a BasicChatRoom"
;
return
nullptr
;
L_D
()
;
return
d
->
me
;
}
int
BasicChatRoom
::
getParticipantCount
()
const
{
...
...
src/db/main-db.cpp
View file @
503585ac
...
...
@@ -362,8 +362,6 @@ long long MainDbPrivate::insertChatRoom (const shared_ptr<AbstractChatRoom> &cha
soci
::
use
(
lastUpdateTime
),
soci
::
use
(
capabilities
),
soci
::
use
(
subject
),
soci
::
use
(
flags
),
soci
::
use
(
notifyId
);
id
=
dbSession
.
getLastInsertId
();
if
(
!
chatRoom
->
canHandleParticipants
())
return
id
;
// Do not add 'me' when creating a server-group-chat-room.
if
(
chatRoomId
.
getLocalAddress
()
!=
chatRoomId
.
getPeerAddress
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment