mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 19:46:22 +00:00
upstream: fix(ui): Fix custom outgoing stamp and fix stamp command help (b0a89530f)
This commit is contained in:
@@ -2413,7 +2413,7 @@ static const struct cmd_t command_defs[] = {
|
||||
"/stamp unset outgoing|incoming")
|
||||
CMD_DESC("Set chat window stamp. "
|
||||
"The format of line in the chat window is: \"<timestamp> <encryption sign> <stamp> <message>\" "
|
||||
"where <stamp> is \"me:\" for incoming messages or \"username@server/resource\" for outgoing messages. "
|
||||
"where <stamp> is \"me:\" for outgoing messages or \"username@server/resource\" for incoming messages. "
|
||||
"This command allows to change <stamp> value.")
|
||||
CMD_ARGS({ "outgoing", "Set outgoing stamp" },
|
||||
{ "incoming", "Set incoming stamp"},
|
||||
|
||||
@@ -9071,15 +9071,15 @@ gboolean
|
||||
cmd_stamp(ProfWin* window, const char* const command, gchar** args)
|
||||
{
|
||||
if (g_strv_length(args) == 0) {
|
||||
auto_gchar gchar* def_incoming = prefs_get_string(PREF_OUTGOING_STAMP);
|
||||
if (def_incoming) {
|
||||
cons_show("The outgoing stamp is: %s", def_incoming);
|
||||
auto_gchar gchar* def_outgoing = prefs_get_string(PREF_OUTGOING_STAMP);
|
||||
if (def_outgoing) {
|
||||
cons_show("The outgoing stamp is: %s", def_outgoing);
|
||||
} else {
|
||||
cons_show("The default outgoing stamp is used.");
|
||||
}
|
||||
auto_gchar gchar* def_outgoing = prefs_get_string(PREF_INCOMING_STAMP);
|
||||
if (def_outgoing) {
|
||||
cons_show("The incoming stamp is: %s", def_outgoing);
|
||||
auto_gchar gchar* def_incoming = prefs_get_string(PREF_INCOMING_STAMP);
|
||||
if (def_incoming) {
|
||||
cons_show("The incoming stamp is: %s", def_incoming);
|
||||
} else {
|
||||
cons_show("The default incoming stamp is used.");
|
||||
}
|
||||
|
||||
@@ -419,7 +419,8 @@ chatwin_outgoing_msg(ProfChatWin* chatwin, const char* const message, const char
|
||||
const char* display_message = plugin_message ?: message;
|
||||
|
||||
if (request_receipt && id) {
|
||||
win_print_outgoing_with_receipt((ProfWin*)chatwin, enc_char, "me", display_message, id, replace_id);
|
||||
auto_gchar gchar* outgoing_str = prefs_get_string(PREF_OUTGOING_STAMP);
|
||||
win_print_outgoing_with_receipt((ProfWin*)chatwin, enc_char, outgoing_str, display_message, id, replace_id);
|
||||
} else {
|
||||
win_print_outgoing((ProfWin*)chatwin, enc_char, id, replace_id, display_message);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ gchar*
|
||||
get_display_name(const ProfMessage* const message, int* flags)
|
||||
{
|
||||
if (equals_our_barejid(message->from_jid->barejid)) {
|
||||
return g_strdup("me");
|
||||
return prefs_get_string(PREF_OUTGOING_STAMP);
|
||||
} else {
|
||||
if (flags)
|
||||
*flags = NO_ME;
|
||||
|
||||
Reference in New Issue
Block a user