-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joining a channel from Spectrum2 doesn’t work #60
Comments
This Spectrum2 I guess ? ... If you run pidgin with --debug we should be able to see how it tries to communicate with the gateway. |
Yes, this one. I already have the XML logs from another XMPP client (I don’t use Pidgin), is this what you are interested in? |
logs showing how purple-mattermost is communicating with the Spectrum2 - yes. |
Here is the backend-1.log file generated by this Spectrum backend, anonymised: backend-1.log.txt Please tell me if you need some parts non-anonymised, or if you need me to do some other action, or to annotate it. And thanks for looking into it! |
OK, I see that when we send 'mm_get_users_by_ids' request:
we do not seem the get the response - we expect something alike:
here. but instead it seems we get:
.. as a result we have no user information and the rest of the code fails (yeah .. error checking is far from being complete ..):
now: this could be because we actually send a malformed json (my bad ..) :
to:
recompile and retry: please let me know if it helps (we should see in log a response in form |
I apparently get a different answer though, but there is another place where [] is the answer. Here is a fix to send a proper array, you can merge it if you want: 0001-Fix-sending-simple-array-for-user_ids.patch.txt It doesn’t fix my issue though, I still get [] as an answer, or is it possible that the answer gets displayed before the postdata request? |
Thanks for the fix: #61 ! |
I was always able to see buddies, but I’m still not able to join MUCs, they only contain myself, no matter the number of users joined. |
OK, I think the current master has some problems (for example some channels will appear only on restart .. etc): can you check multi-team branch: https://github.com/EionRobb/purple-mattermost/tree/multi-team |
Spectrum doesn’t use this blist.xml file, I’ve heard. And yes, MUC = Multi User Chat, the way channels should be represented on XMPP. This multi-team branch doesn’t include your fix, is it up to date? |
yes, added it there too. |
I've just opened #64, that maybe similar to this. |
I never got a segfault though, it’s probably a different issue. |
Regarding muc support for spectrum2:
but there are some more issues, so I still cannot join |
Also to show tree of chats for spectrum2 mm_roomlist_expand_category() implementation looks required. |
I've made quite dirty patch yesterday which makes it usable with spectrum2. I did not make PR because of there is a change to channel_id as primary identifier. I dropped team-id^channel-id^channel-name---team-name format. |
Thanks for investigating: we would need to make some more changes as this will break multi-team feature I'm afraid (same channel names across different teams)... let me check what could be done here.. |
I guess that channel ids are unique between teams. Also I think there may be problems with getting roomlist in spectrum. At least I found that psi+ works well enough, but gajim fails to join into some channels. Also it tries to add all channel people to your jabber roster. So roomlist and adding buddies need more investigations. |
And one more issue: spectrum assumes human readable room names, so channel id as name is slightly painful: you need to rename each room. Maybe there is an ability to provide vcard for rooms, I don't know. |
Hmm.. I'm trying to figure out why the team-id^channel-id^channel-name---team-name is not understood (or accepted) by spectrum2 .. is this question of some characters (^? or --- ?) or sthg else ? |
It passes "name" to jabber client and then it is used to join channel. So it will work if you pass this string everywhere. But currently as I understand it makes ^ separated string only from serialize which looks not called by spectrum2. |
You may try to use it with spectrum. It is quite easy. You need XMPP server and create spectrum2 config (/etc/spectrum2/transports/mattermost.cfg):
Then run "/usr/bin/spectrum2 -j mattermost.XMPP-DOMAIN.com /etc/spectrum2/transports/mattermost.cfg -n" |
You just need to add transport to XMPP-server: for example for ejabberd.yml:
|
I see that roomlist returned from mm_roomlist_get_list() before it filled with all rooms and spectrum2 looks like copies roomlist to internal structures, so I guess it is race condition. |
Thank you for all the information: I will try to have a look at that, but unfortunately for now I'm little bit busy with other projects ... so may take some time ... |
You may look into https://github.com/p5n/purple-mattermost |
Cool ! Can you change line termination (I guess that is what makes the diff of whole file ?): master...p5n:master .. |
I've done unix2dos and push it but it does not help. it is strange because of |
Ah, it was cached. Now it is better but my emacs also breaks tabs according to coding standard :S |
Also I think you should not try to add groupchats into roster. It breaks gajim for example, however psi+ works with it. |
@p5n : Please check https://github.com/EionRobb/purple-mattermost/tree/v4api_try_spectrum2 I have ported your changes to v4 api (well, not sure if this is complete since diff/patch did show all sorts of formatting / whitespace etc changes ...). Unfortunately these changes in current state break the plugin for pidgin:
Here is a screenshot of this version: and here is a screenshot of how it looks like without this patch: for comparison. Nevertheless: this version may work with spectrum2: could you please try and review changes ? Thanks ! |
Sadly the spectrum2 changes shouldn't be necessary as of the latest version of spectrum2. I worked with the spectrum devs a few weeks ago to fix the room list support to work with the correct chat ids that libpurple needs |
Why sadly ? even better ! 👍 |
@jaroslawp thank you, I was able to join channel with v4api_try_spectrum2 branch, but there need more debugging with spectrum2 anyway. |
Any update on this? Using Finch everything seems to be working fine. Using spectrum2 through Gajim I can list the channels I am part of using the "join group chat" dialog but unfortunately, I experience the same issue as @linkmauve , I am alone in the channel and nothing else works. Examining spectrum2 logs I see:
I am not sure if this comment belongs here or on the spectrum2 repo… |
When I join a channel from Spectrum2 I’d expect to see the users who are already present there and interact with them.
Instead, first of all there is no discovery or automated invite sent to the user when they first register to the gateway, as well as no information about the format of the mapped JID, and then both
mm_join_chat()
andmm_chat_info_defaults()
don’t get called.I did modify the
g_strsplit_set()
call inmm_chat_info_defaults()
to avoid using '/' as a separator, which isn’t something representable in the localpart of a JID, but I’m not even sure it’s the way I should interact with the gateway.In any case, after I join a room, I see myself in it, without any other participant, and shortly after receive a roster push with my nick in the room, which is definitely not something that should happen.
At some point I did receive messages sent from participants in the channel, but as if they were sent to me in private, and it added them to my roster both on XMPP and on the web UI, without me actually doing anything, just after they spoke.
So this whole thing is a mess, I’m probably doing something wrong, but this prpl too. :)
I can attach logs of me doing anything you want if that may help.
Thanks.
The text was updated successfully, but these errors were encountered: