Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
879185f8
Commit
879185f8
authored
Jul 06, 2021
by
Olivier Dion
Browse files
agent: Use static account ID
Change-Id: I68e954bc8de9548a9da0026c014f27141e0b7ec0
parent
c57b956a
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/agent/agent.cpp
View file @
879185f8
...
...
@@ -77,12 +77,6 @@ Agent::configure(const std::string& yaml_config)
YAML
::
Node
node
=
YAML
::
Load
(
file
);
auto
account
=
node
[
"account-id"
];
AGENT_ASSERT
(
account
.
IsScalar
(),
"Bad or missing field `account-id`"
);
accountID_
=
account
.
as
<
std
::
string
>
();
auto
peers
=
node
[
"peers"
];
AGENT_ASSERT
(
peers
.
IsSequence
(),
"Configuration node `peers` must be a sequence"
);
...
...
@@ -131,13 +125,16 @@ Agent::ensureAccount()
details
[
DRing
::
Account
::
ConfProperties
::
ARCHIVE_PIN
]
=
""
;
details
[
DRing
::
Account
::
ConfProperties
::
ARCHIVE_PATH
]
=
""
;
accountID_
=
DRing
::
addAccount
(
details
);
AGENT_ASSERT
(
accountID_
=
=
DRing
::
addAccount
(
details
,
accountID_
),
"Bad accountID"
);
wait_for_announcement_of
(
accountID_
);
details
=
DRing
::
getAccountDetails
(
accountID_
);
}
AGENT_ASSERT
(
"AGENT"
==
details
.
at
(
DRing
::
Account
::
ConfProperties
::
DISPLAYNAME
),
"Bad display name"
);
peerID_
=
details
.
at
(
DRing
::
Account
::
ConfProperties
::
USERNAME
);
}
...
...
@@ -335,8 +332,8 @@ Agent::run(const std::string& yaml_config)
static
Agent
agent
;
agent
.
initBehavior
();
agent
.
configure
(
yaml_config
);
agent
.
ensureAccount
();
agent
.
configure
(
yaml_config
);
agent
.
getConversations
();
agent
.
installSignalHandlers
();
agent
.
registerStaticCallbacks
();
...
...
test/agent/agent.h
View file @
879185f8
...
...
@@ -90,7 +90,7 @@ class Agent
/* Bookkeeping */
std
::
string
peerID_
;
std
::
string
accountID_
;
const
std
::
string
accountID_
{
"afafafafafafafaf"
}
;
std
::
vector
<
std
::
string
>
peers_
;
std
::
vector
<
std
::
string
>
conversations_
;
std
::
unique_ptr
<
BT
::
Node
>
root_
;
...
...
test/agent/jami-agent-config.yml
View file @
879185f8
...
...
@@ -7,8 +7,6 @@ behavior:
peers
:
-
"
your-peer-id"
account-id
:
"
d65ebb0f1170ae44"
params
:
-
[
upnpEnabled
:
"
true"
,
turnEnabled
:
"
true"
]
# - [ upnpEnabled: "true", turnEnabled: "false" ]
...
...
Write
Preview
Supports
Markdown
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