why I get this error:

friends.c:241:32: error: assignment of member ‘first_post’ in read-only object
  241 |             author->first_post = new_post;
int make_post(const User *author, User *target, char *contents) {
    if (author == NULL || target == NULL) {
        return 2;
    }
    int i = 0;
    while (author->friends[i] != NULL && i < MAX_FRIENDS) {
        User *curr_friend = author->friends[i];
        if (compare(curr_friend->name, target->name) == 0) {
            Post *new_post = malloc(sizeof(struct post));
            if (new_post == NULL) {
                perror("malloc");
                exit(3);
            }
            strcpy(new_post->author, author->name);
            (new_post->author)[strlen(author->name)] = '\0';
            new_post->contents = contents;
            time(new_post->date);
            new_post->next = author->first_post;
            author->first_post = new_post;
            return 0;
        }
        i++;
    }
    return 1;
}