GithubHelp home page GithubHelp logo

awslabs / pidgin-chime Goto Github PK

View Code? Open in Web Editor NEW
56.0 56.0 13.0 2.08 MB

Pidgin/libpurple plugin for Amazon Chime

License: GNU Lesser General Public License v2.1

Makefile 1.32% M4 1.03% Shell 0.13% C 97.25% Python 0.27%

pidgin-chime's People

Contributors

ajorg-aws avatar bgmilne avatar danielgmyers avatar dlenski avatar dwmw2 avatar etanol avatar glotzer-amazon avatar gqmelo avatar hyandell avatar mcrha avatar nacho avatar nicolagi avatar nmeyerhans avatar phillipberndt avatar w4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pidgin-chime's Issues

Doesn't link with LDFLAGS="-Wl,--no-undefined -Wl,--as-needed"

When building as follows, there are multiple undefined reference to XXX errors

./autogen.sh && LDFLAGS="-Wl,--no-undefined -Wl,--as-needed" ./configure && make

Specifically:

  1. libapp-transmitter.la needs $(FARSTREAM_LIBS)
make[1]: Entering directory '/home/bgmilne/Downloads/github/pidgin-chime/fs-app-transmitter'
  CCLD     libapp-transmitter.la
.libs/libapp_transmitter_la-fs-app-stream-transmitter.o: In function `fs_app_stream_transmitter_class_init':
/home/bgmilne/Downloads/github/pidgin-chime/fs-app-transmitter/fs-app-stream-transmitter.c:176: undefined reference to `fs_stream_transmitter_get_type'
  1. libchimeprpl.la needs -ldl
  CCLD     libchimeprpl.la
prpl/.libs/libchimeprpl_la-chat.o: In function `select_screen_share':
/home/bgmilne/Downloads/github/pidgin-chime/prpl/chat.c:629: undefined reference to `dlopen'
/home/bgmilne/Downloads/github/pidgin-chime/prpl/chat.c:631: undefined reference to `dlsym'
  1. The evolution plugin uses functions from libcamel (libcamel-1.2.so in my case)
make[1]: Entering directory '/home/bgmilne/Downloads/github/pidgin-chime/evolution-plugin'
  CC       module_event_from_template_la-event-from-template.lo
  CCLD     module-event-from-template.la
.libs/module_event_from_template_la-event-from-template.o: In function `generate_comp':
/home/bgmilne/Downloads/github/pidgin-chime/evolution-plugin/event-from-template.c:233: undefined reference to `camel_internet_address_new'
/home/bgmilne/Downloads/github/pidgin-chime/evolution-plugin/event-from-template.c:234: undefined reference to `camel_address_get_type'
/home/bgmilne/Downloads/github/pidgin-chime/evolution-plugin/event-from-template.c:234: undefined reference to `camel_address_unformat'
  1. The pidgin plugin uses symbols provided by the pidgin binary, which libtool doesn't seem to pass the correct options to ld for:
.libs/chimeseen_la-chimeseen.o: In function `chimeseen_plugin_load':
/home/bgmilne/Downloads/github/pidgin-chime/chimeseen/chimeseen.c:163: undefined reference to `pidgin_conversations_get_handle'
.libs/chimeseen_la-chimeseen.o: In function `conv_seen_cb':
/home/bgmilne/Downloads/github/pidgin-chime/chimeseen/chimeseen.c:95: undefined reference to `gtk_imhtml_get_type'
.libs/chimeseen_la-chimeseen.o: In function `got_convmsg_cb':
/home/bgmilne/Downloads/github/pidgin-chime/chimeseen/chimeseen.c:122: undefined reference to `gtk_imhtml_get_type'

While it is not such an issue with plugins, some distributions (e.g. Mageia) apply -Wl,--no-undefined -Wl,--as-needed by default in RPM macros that are plumbed into %configure, in order to avoid unnecessary transitive dependencies. See e.g. Underlinking issues in packaging

User search not working

The user search feature does not work. It looks like the HTTP request format needs to be changed. Here's the relevant debug output:

> POST /registered_auto_completes HTTP/1.1
> Soup-Debug-Timestamp: 1542016304
> Soup-Debug: SoupSession 1 (0x5648a5302610), SoupMessage 16 (0x5648a60f1560), SoupSocket 9 (0x5648a6323100)
> Host: contacts.id.ue1.app.chime.aws
> Cookie: [..removed..]
> Accept: */*
> User-Agent: Pidgin-Chime 1.1
> Content-Type: application/json
> Accept-Encoding: gzip, deflate
> Connection: Keep-Alive
> 
> {"q":"tetas"}
  
< HTTP/1.1 500 Internal Server Error
< Soup-Debug-Timestamp: 1542016304
< Soup-Debug: SoupMessage 16 (0x5648a60f1560)
< Content-Encoding: gzip
< Content-Type: text/html; charset=utf-8
< Date: Mon, 12 Nov 2018 09:51:44 GMT
< Server: Server
< Status: 500 Internal Server Error
< Vary: Accept-Encoding,User-Agent
< X-Powered-By: Phusion Passenger 5.0.7
< x-request-id: 16ab0036-2d98-4483-8063-539885702e8b
< x-runtime: 0.024998
< Content-Length: 579
< Connection: keep-alive
< 
< <!DOCTYPE html>
< <html>
< <head>
<   <title>We're sorry, but something went wrong (500)</title>
<   <style>
<   body {
<     background-color: #EFEFEF;
<     color: #2E2F30;
<     text-align: center;
<     font-family: arial, sans-serif;
<   }
< 
<   div.dialog {
<     width: 25em;
<     margin: 4em auto 0 auto;
<     border: 1px solid #CCC;
<     border-right-color: #999;
<     border-left-color: #999;
<     border-bottom-color: #BBB;
<     border-top: #B00100 solid 4px;
<     border-top-left-radius: 9px;
<     border-top-right-radius: 9px;
<     background-color: white;
<     padding: 7px 4em 0 4em;
<   }
< 
<   h1 {
<     font-size: 100%;
<     color: #730E15;
<     line-height: 1.5em;
<   }
< 
<   body > p {
<     width: 33em;
<     margin: 0 auto 1em;
<     padding: 1em 0;
<     background-color: #F7F7F7;
<     border: 1px solid #CCC;
<     border-right-color: #999;
<     border-bottom-color: #999;
<     border-bottom-left-radius: 4px;
<     border-bottom-right-radius: 4px;
<     border-top-color: #DADADA;
<     color: #666;
<     box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
<   }
<   </style>
< </head>
< 
< <body>
<   <!-- This file lives in public/500.html -->
<   <div class="dialog">
<     <h1>We're sorry, but something went wrong.</h1>
<   </div>
<   <p>If you are the application owner check the logs for more information.</p>
< </body>
< </html>


Does this work on mac os x?

Some details of my setup.

[~/Downloads] % uname -a
Darwin **** 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 21 20:07:39 PDT 2018; root:xnu-3789.73.14~1/RELEASE_X86_64 x86_64
[~/Downloads/pidgin-chime-1.1] % pkg-config --variable pc_path pkg-config
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12

I use Homebrew for most packages, but needed to use Macports for farstream(farstream-0.2) which automatically installed a few more packages. I setup PKG_CONFIG_PATH to /opt/local/lib/pkgconfig where macports installed the packages. I had to manually install xproto (xproto-7.0.31), kbproto (kbproto-1.0.7), renderproto (renderproto-0.11) and xextproto (xextproto-7.3.0). I did this from https://www.x.org/archive/individual/proto/ since I could not find these from either macports or homebrew.

After this, ./autogen.sh succeeded, but make failed with the following error.

Making all in chimeseen
  CC       chimeseen_la-chimeseen.lo
  CCLD     chimeseen.la
Undefined symbols for architecture x86_64:
  "_gtk_imhtml_get_type", referenced from:
      _got_convmsg_cb in chimeseen_la-chimeseen.o
      _conv_seen_cb in chimeseen_la-chimeseen.o
  "_pidgin_conversations_get_handle", referenced from:
      _chimeseen_plugin_load in chimeseen_la-chimeseen.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [chimeseen.la] Error 1
make: *** [all-recursive] Error 1

Please help me get this to work, and I will be a happy bird chatting from my terminal with bitlbee and weechat on my Chime account. Feel free to ask for any information that might help. Thanks.

Crashes when starting pidgin

When I start pidgin, after receiving all past messages (apparently), pidgin constantly crashes.
The issue seems to be due to an invalid JSON - maybe it gets invalid after some cleaning.

I am attaching a debug log + callstack in debug mode

Lots of this warning was seen:

(Pidgin:19241): Json-CRITICAL **: 10:32:30.001: json_node_get_object: assertion 'JSON_NODE_TYPE (node) == JSON_NODE_OBJECT' failed

Attached files:

  • pidgin-issue-debug.txt - I ran export CHIME_DEBUG=2; gdb --args pidgin -d
  • pidgin-callstack.txt - I ran gdb pidgin

the chime plugin is compiled with debug enabled. (-O0 -g).

pidgin-callstack.txt
pidgin-issue-debug.txt

Downloads all of everything, including images, on first connection

I seem to recall some discussion of this, but wanted to be sure it was logged as an issue. When you first log in, all of your conversations begin to download, seemingly from the beginning of time. This includes any images you were sent in that time. It can take a very long time to download, and your computer is very busy for the duration.

Unable to authenticate

Using the username and password that works through the web app (using Chrome browser on Linux) I am unable to authenticate with the pidging plugin.

Using the chime-get-token executable I end up with Path query returned no results: //form[@name='consent-form'] .

Tried to follow the instructions in the readme to get the session token interactively, but from https://signin.id.ue1.app.chime.aws/ I end up at https://www.amazon.com/ap/signin?_encoding=UTF8&openid.mode=checkid_setup&openid.ns=......... and once I enter my username and password there I get into chime, i.e. nothing that sets the url to something that looks like chime://sso_sessions?Token=eyJyZ…

Help is appreciated.

Evolution doesn't know how to handle a CreateEvent when organizer email address doesn't match Chime address exactly

This plugin uses D-Bus to create meetings events, which integrates nicely with Evolution:

	g_dbus_proxy_call(proxy, "CreateEvent",
			  g_variant_new("(ssss^as)", data->conn->account->username,
					"Chime meeting", location, description_text,
					attendees),
			  G_DBUS_CALL_FLAGS_NONE, 10000, NULL, sent_create_event, data);

There's an issue with Evolution (tested with v3.28): if the email address specified as organizer in the CreateEvent call does not exactly match the user's Chime sign-in name, Evolution will not allow the user to edit the meeting invite created. ("Meeting can not be fully edited because you are not the organizer").

This might occur if, for example, the user's Chime sign-in address is [email protected] while the email address used in Evolution is [email protected], or if the user has multiple accounts configured in Evolution.

Leaving the meeting organizer address as an empty string ("") avoids this issue (again, with Evolution v3.28) and allows the user to edit the meeting, including selecting an alternate account as organizer if it's misconfigured. I'll submit a PR to address this.

Support markdown/rich-text

Recent versions of the Chime web and desktop apps allow the user to write rich text messages using markdown, by putting /md on the first line of the message.

It would be great if pidgin-chime supported (1) rendering received messages as formatted text and perhaps (2) perhaps converting formatted input to Markdown as well.

  1. Formatting received markdown messages: If the client receives an incoming message whose raw text is…

    /md
    > Hello world.
    
    I **totally** agree
    

    … then it should display:

    Hello world.

    I totally agree

  2. Converting formatted input to Markdown: If the user types this in Pidgin's rich-text input window…

    Why hello, world!

    … then the client should send:

    /md
    Why _hello_, world!
    

    I imagine some users will prefer to enter Markdown by hand, rather than use Pidgin's rich-text entry. Should be possible to support both use cases seamlessly by not performing this step if the entry doesn't use rich-text formatting and/or starts with /md.

cxn->prpl_conn elimination: Emit signal for login interaction request

We're working on splitting generic Chime code from Purple-specific code, and eliminating all use of the prpl_conn member of ChimeConnection.

To do this for the login code, we probably want to add a new auth-requested signal on the ChimeConnection object. Its arguments can be remarkably similar to what we alreadfy pass to purple_request_fields() or purple_request_input() — title, prompt(s), a boolean field indicating whether we need a username to be provided.

Either we can make it generic enough to also handle request_consent(), or we can introduce a different signal for that, or perhaps just assume consent on the basis that if they install a Chime client and enter their password it's a fairly safe bet that they really did want to use it... ;)

The purple-side code, after receiving the signal and getting responses from the user, would provide them back to the ChimeConnection through a new purple_connection_provide_auth() function. Come up with a better name...

Installation in Ubuntu

How does one install this in pidgen on Ubuntu 18.04? I tried yum, as dnf doesn't work for Ubuntu, but I got a repo error:
There are no enabled repos. Run "yum repolist all" to see the repos you have. You can enable repos with yum-config-manager --enable <repo>
A friend suggested 'apt', but that yielded this:
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package pkgconfig(purple) E: Unable to locate package pkgconfig(libsoup-2.4) E: Couldn't find any package by glob 'pkgconfig(libsoup-2.4)' E: Couldn't find any package by regex 'pkgconfig(libsoup-2.4)' E: Unable to locate package pkgconfig(json-glib-1.0) E: Couldn't find any package by glob 'pkgconfig(json-glib-1.0)' E: Couldn't find any package by regex 'pkgconfig(json-glib-1.0)'

Messages received by the plugin are marked as 'read' right away

If Pidgin is online, whenever a new message arrives it is marked as read, whereas it only appears as "delivered" when getting to other clients while Pidgin is disconnected.

This may seem like a minor issue, however it sets the expectation to receive an answer soon while in fact other logged-in devices won't see any notification, making the messages even harder to notice.

No inbound audio after Pidgin has been running for some time.

This seems to consistently happen when Pidgin has been running for a few hours. Joining a call results in no incoming audio, although the dumped pipeline looks correct and packets are being received from the network and fed into it. This persists until Pidgin is restarted.

Sharing screen is slow and not always update

Sharing screen is slow and sometimes it takes couple minutes to change. I also noticed that after it starts to change, when it starts, it is very slow.

I am using version 1.1-8 on ubuntu

Signin broken for AD users

Hiya,

I'm getting an error "Error during corporate authentication setup" when attempting to sign-in.

I've verified the issue is present in master in 1309251 (current HEAD).

Output of chime-get-token is in this gist.

Implement the ability to leave chat rooms

It is currently possible to join a chat but not leave a chat room, unless you ask an administrator to kick you out.

Even if you close the chat window, if someone from the room mentions you (either directly or via All Members) the chat room window will pop up again.

Ubuntu 20.04 - Screen share doesn't resize anymore

Pidgin version: 2.14.0devel
plugin version: pidgin-chime 1.3
OS: Ubuntu 20.04 - kernel 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
WM : XFCE 4.14

When someone shares their screen with me; I cannot resize the window to make it bigger anymore. This used to work just fine under 18.04.. I don't know what changed :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.