Add option to color MUC history like regular messages

`/logging group color` has:
* `unanimous` which will color it with one unanimous color. Like it was
done always.
* `regular` which colors it like regular incoming messages.

Regards https://github.com/profanity-im/profanity/issues/1261
This commit is contained in:
Michael Vetter
2020-02-20 08:11:58 +01:00
parent 6aa793fca6
commit 80dd3fdbb2
7 changed files with 72 additions and 17 deletions

View File

@@ -1746,6 +1746,7 @@ _get_group(preference_t pref)
case PREF_STATUSBAR_CHAT:
case PREF_STATUSBAR_ROOM:
case PREF_TITLEBAR_MUC_TITLE:
case PREF_HISTORY_COLOR_MUC:
return PREF_GROUP_UI;
case PREF_STATES:
case PREF_OUTTYPE:
@@ -2048,6 +2049,8 @@ _get_key(preference_t pref)
return "sendfile";
case PREF_CORRECTION_ALLOW:
return "correction.allow";
case PREF_HISTORY_COLOR_MUC:
return "history.muc.color";
default:
return NULL;
}
@@ -2177,6 +2180,8 @@ _get_default_string(preference_t pref)
return "automatic";
case PREF_COLOR_NICK:
return "false";
case PREF_HISTORY_COLOR_MUC:
return "unanimous";
default:
return NULL;
}

View File

@@ -165,6 +165,7 @@ typedef enum {
PREF_OMEMO_SENDFILE,
PREF_OCCUPANTS_WRAP,
PREF_CORRECTION_ALLOW,
PREF_HISTORY_COLOR_MUC,
} preference_t;
typedef struct prof_alias_t {