Commit add71ef376c13929e465f9d5ed8722ec11317929

Authored by Matti Virkkunen
1 parent 9c222565

Report actual UI name when logging in.

Showing 1 changed file with 12 additions and 1 deletions
purpleline_login.cpp
  1 +#include <glib.h>
  2 +
  3 +#include <core.h>
  4 +
1 #include "purpleline.hpp" 5 #include "purpleline.hpp"
2 6
3 void PurpleLine::login_start() { 7 void PurpleLine::login_start() {
@@ -53,13 +57,20 @@ void PurpleLine::get_auth_token() { @@ -53,13 +57,20 @@ void PurpleLine::get_auth_token() {
53 57
54 purple_debug_info("line", "Logging in with credentials to get new auth token.\n"); 58 purple_debug_info("line", "Logging in with credentials to get new auth token.\n");
55 59
  60 + std::string ui_name = "purple-line";
  61 +
  62 + GHashTable *ui_info = purple_core_get_ui_info();
  63 + gpointer ui_name_p = g_hash_table_lookup(ui_info, "name");
  64 + if (ui_name_p)
  65 + ui_name = (char *)ui_name_p;
  66 +
56 c_out->send_loginWithIdentityCredentialForCertificate( 67 c_out->send_loginWithIdentityCredentialForCertificate(
57 line::IdentityProvider::LINE, 68 line::IdentityProvider::LINE,
58 purple_account_get_username(acct), 69 purple_account_get_username(acct),
59 purple_account_get_password(acct), 70 purple_account_get_password(acct),
60 true, 71 true,
61 "127.0.0.1", 72 "127.0.0.1",
62 - "purple-line (Pidgin)", 73 + ui_name,
63 certificate); 74 certificate);
64 c_out->send([this]() { 75 c_out->send([this]() {
65 line::LoginResult result; 76 line::LoginResult result;