-
Notifications
You must be signed in to change notification settings - Fork 118
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
purple: add defer_joins, use_matrix_alias and name_with_tag options #125
base: master
Are you sure you want to change the base?
Conversation
(Most of these changes are aimed at making matrix not a pain to use) - The `defer_joins` option on prpl accounts waits for users to be added to a prpl conversation before adding the bitlbee user, in the hope of being able to get some chat name/alias metadata before doing so. - (To that end, the name hint for rooms is now updated when users are added.) - The `name_with_tag` options prefixes the account tag to the name hint for prpl accounts, in order to namespace prpl channels somewhat. - The `use_matrix_alias` option is specialized for the purple-matrix plugin, and makes the name hint use the `matrix_alias` data item of the prpl conversation, instead of the title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fancy stuff. Not entirely sure about having a whole bunch of extra settings, but it's probably the right thing to do, there's no polite way to change channel name defaults.
Having help strings for these would be nice btw.
@@ -1171,7 +1205,7 @@ static void handle_conv_msg(PurpleConversation *conv, const char *who, const cha | |||
{ | |||
struct im_connection *ic = purple_ic_by_pa(conv->account); | |||
struct groupchat *gc = conv->ui_data; | |||
char *message = g_strdup(message_); | |||
char *message = purple_unescape_html(message_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: This seems unlikely to be desirable for all prpls. I think there's a prpl flag to mark it as sending html or not?
@@ -1133,7 +1158,12 @@ void prplcb_conv_new(PurpleConversation *conv) | |||
/* libpurple brokenness: Whatever. Show that we join right away, | |||
there's no clear "This is you!" signaling in _add_users so | |||
don't even try. */ | |||
imcb_chat_add_buddy(gc, gc->ic->acc->user); | |||
if (!set_getbool(&(ic->acc->set), "defer_joins")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: Considering the comment above, I wonder if this should be default behavior, because yeah, this ugly behavior affects quite a few prpls.
It's mostly a question of whether the defer point is always reached reliably - would, say, a newly created channel with no other members skip the add users call? Some weird prpl that just don't do it, and add them with delay?
@@ -1154,6 +1184,10 @@ void prplcb_conv_add_users(PurpleConversation *conv, GList *cbuddies, gboolean n | |||
|
|||
imcb_chat_add_buddy(gc, pcb->name); | |||
} | |||
purple_hint_chat_names(gc, conv); | |||
if (!gc->joined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self, recheck the meaning of this one.
Is the use_matrix_alias for using something similar to the telegram username? |
No, use_matrix_alias is a sort-of hack that works only for the Matrix prpl,
unfortunately.On Sat, 2019-06-15 at 08:50 -0700, Thaodan wrote:
… Is the use_matrix_alias for using something similar to the telegram username?
If yes it could have some use in telegram too.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "
#125?email_source=notifications\u0026email_token=ACHXT5TFLZTOIVMSUQ6IZMTP2UFSVA5CNFSM4HDSDB6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXY2XDQ#issuecomment-502377358
",
"url": "
#125?email_source=notifications\u0026email_token=ACHXT5TFLZTOIVMSUQ6IZMTP2UFSVA5CNFSM4HDSDB6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXY2XDQ#issuecomment-502377358
",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
What's missing in this to be merged? |
(Most of these changes are aimed at making matrix not a pain to use)
defer_joins
option on prpl accounts waits for users to be addedto a prpl conversation before adding the bitlbee user, in the hope
of being able to get some chat name/alias metadata before doing so.
added.)
name_with_tag
options prefixes the account tag to the name hintfor prpl accounts, in order to namespace prpl channels somewhat.
use_matrix_alias
option is specialized for the purple-matrixplugin, and makes the name hint use the
matrix_alias
data itemof the prpl conversation, instead of the title.
MAX_NICK_LENGTH
was increased to 80 (because matrix room names are long).