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 5 #include "purpleline.hpp"
2 6  
3 7 void PurpleLine::login_start() {
... ... @@ -53,13 +57,20 @@ void PurpleLine::get_auth_token() {
53 57  
54 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 67 c_out->send_loginWithIdentityCredentialForCertificate(
57 68 line::IdentityProvider::LINE,
58 69 purple_account_get_username(acct),
59 70 purple_account_get_password(acct),
60 71 true,
61 72 "127.0.0.1",
62   - "purple-line (Pidgin)",
  73 + ui_name,
63 74 certificate);
64 75 c_out->send([this]() {
65 76 line::LoginResult result;
... ...