diff options
| author | 2023-01-27 18:28:55 +0100 | |
|---|---|---|
| committer | 2023-01-27 18:28:55 +0100 | |
| commit | 756e8cb2a7936acea6f6f26580c8d632ab30d70f (patch) | |
| tree | 9106c96c24ee537716809878d997c6aee22bd810 | |
| parent | Some tweaks to the default avatar. (diff) | |
| download | snac2-756e8cb2a7936acea6f6f26580c8d632ab30d70f.tar.gz snac2-756e8cb2a7936acea6f6f26580c8d632ab30d70f.tar.xz snac2-756e8cb2a7936acea6f6f26580c8d632ab30d70f.zip | |
More tweaks to the default avatar.
| -rw-r--r-- | activitypub.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 43d845c..663ee3f 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -37,7 +37,12 @@ const char *susie_cool = | |||
| 37 | const char *default_avatar_base64(void) | 37 | const char *default_avatar_base64(void) |
| 38 | /* returns the default avatar in base64 */ | 38 | /* returns the default avatar in base64 */ |
| 39 | { | 39 | { |
| 40 | return susie; | 40 | time_t t = time(NULL); |
| 41 | struct tm tm; | ||
| 42 | |||
| 43 | gmtime_r(&t, &tm); | ||
| 44 | |||
| 45 | return tm.tm_wday == 0 || tm.tm_wday == 6 ? susie_cool : susie; | ||
| 41 | } | 46 | } |
| 42 | 47 | ||
| 43 | 48 | ||